spec test index / oilshell.org
| case | bash | mksh | osh | description |
| 0 | pass | pass | pass | Assignment Causes Array Decay |
| 1 | pass | pass | FAIL | Array Decay with IFS |
| details | ||||
| 2 | pass | pass | FAIL | User arrays decay |
| details | ||||
| 3 | pass | pass | FAIL | $a gives first element of array |
| details | ||||
| 4 | pass | pass | pass | Assign to array index without initialization |
| 5 | pass | pass | pass | a[40] grows array |
| 6 | pass | pass | pass | array decays to string when comparing with [[ a = b ]] |
| 7 | pass | pass | FAIL | Increment array variables |
| details | ||||
| 8 | pass | N-I | pass | Apply vectorized operations on ${a[*]} |
| details |
22 passed, 0 ok, 1 known unimplemented, 0 known bugs, 4 failed, 0 skipped
| osh | 1 Array Decay with IFS [osh stdout] Expected "['[x y z]']\n", got "['[ y z]']\n" stdout: ['[ y z]']stderr: |
| osh | 2 User arrays decay [osh stdout] Expected "['x', 'y', 'z']\n['x y z']\n['x', 'YYY', 'z']\n", got "['x', 'y', 'z']\n" [osh status] Expected 0, got 1 stdout: ['x', 'y', 'z']stderr: argv.py "${b[@]}"
^~
[ stdin ]:7: fatal: Can't index string with @: (value.Str s:'x y z')
|
| osh | 3 $a gives first element of array [osh stdout] Expected '1\n', got '1 2 3\n' stdout: 1 2 3stderr: |
| osh | 7 Increment array variables [osh stdout] Expected '2 2\n', got '' [osh status] Expected 0, got 1 stdout: stderr: *** Error has no source location info *** fatal: Can't use assignment like ++ or += on arrays |
| mksh | 8 Apply vectorized operations on ${a[*]} stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${a[*]#-}: bad substitution
|