Results for array-compat.test.sh

casebashmkshoshdescription
0pass pass pass Assignment Causes Array Decay
1pass pass FAIL Array Decay with IFS
details
2pass pass pass User arrays decay
3pass pass FAIL $a gives first element of array (TODO: osh should disallow)
details
4pass pass pass Assign to array index without initialization
5pass pass pass a[40] grows array
6pass pass pass array decays to string when comparing with [[ a = b ]]
7pass pass ok ++ on a whole array increments the first element (disallowed in OSH)
details
8pass N-I pass Apply vectorized operations on ${a[*]}
details

23 passed, 1 ok, 1 known unimplemented, 0 known bugs, 2 failed, 0 skipped

Details on runs that didn't PASS

osh1 Array Decay with IFS

[osh stdout] Expected "['[x y z]']\n", got "['[ y z]']\n"

stdout:
['[ y z]']
stderr:
osh3 $a gives first element of array (TODO: osh should disallow)

[osh stdout] Expected '1\n', got '1 2 3\n'

stdout:
1 2 3
stderr:
osh7 ++ on a whole array increments the first element (disallowed in OSH)

stdout:
stderr: 
  (( a++ ))  # doesn't make sense
  ^~
[ stdin ]:2: fatal: Can't use assignment like ++ or += on arrays
mksh8 Apply vectorized operations on ${a[*]}

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[2]: ${a[*]#-}: bad substitution