Results for append.test.sh

statusbashmkshosh
pass 769
ok 212
N-I 010
BUG 230
total111111
casebashmkshoshdescription
0pass pass pass Append string to string
1pass pass pass Append array to array
2BUG BUG pass Append array to string should be an error
detailsdetails
3ok ok pass Append string to array should be disallowed
detailsdetails
4pass pass pass Append string to array element
5pass BUG pass Append to last element
details
6ok N-I ok Try to append list to element
detailsdetailsdetails
7pass pass pass Strings have value semantics, not reference semantics
8pass pass ok Append to nonexistent string
details
9pass pass pass Append to nonexistent array is allowed
10BUG BUG pass Append used like env prefix is a parse error
detailsdetails
22 passed, 5 OK, 1 not implemented, 5 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

bash2 Append array to string should be an error

stdout:
abc
stderr:
mksh2 Append array to string should be an error

stdout:
abc
stderr:
bash3 Append string to array should be disallowed

stdout:
['xz', 'y']
stderr:
mksh3 Append string to array should be disallowed

stdout:
['xz', 'y']
stderr:
mksh5 Append to last element

stdout:
['1', '2 3', ' 4']
stderr:
bash6 Try to append list to element

stdout:
['1', '2 3']
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 2: a[-1]: cannot assign list to array member
mksh6 Try to append list to element

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: set: a[-1]+: is not an identifier
osh6 Try to append list to element

stdout:
stderr: 
  a[-1]+=(4 5)
          ^
[ stdin ]:2: Expected ) in function definition
osh8 Append to nonexistent string

stdout:
stderr: 
    local a+=a
          ^~~
[ stdin ]:2: fatal: += not allowed in assignment builtin
bash10 Append used like env prefix is a parse error

stdout:
aa
stderr:
mksh10 Append used like env prefix is a parse error

stdout:
a
stderr: