spec test index / oilshell.org
59 passed, 2 ok, 4 known unimplemented, 5 known bugs, 4 failed, 0 skipped
osh | 1 set associative array to indexed array literal (bash anomaly) [osh stdout] Expected "['foo', 'spam eggs']\n['k1', 'k2']\n[]\n[]\n", got "[]\n[]\n['foo', 'spam eggs']\n['0', '1']\n" stdout: [] [] ['foo', 'spam eggs'] ['0', '1']stderr: |
osh_ALT | 1 set associative array to indexed array literal (bash anomaly) [osh_ALT stdout] Expected "['foo', 'spam eggs']\n['k1', 'k2']\n[]\n[]\n", got "[]\n[]\n['foo', 'spam eggs']\n['0', '1']\n" stdout: [] [] ['foo', 'spam eggs'] ['0', '1']stderr: |
bash | 2 Can't initialize assoc array with indexed array stdout: stderr: _tmp/spec-bin/bash: line 1: A: 1: must use subscript when assigning associative array _tmp/spec-bin/bash: line 1: A: 2: must use subscript when assigning associative array _tmp/spec-bin/bash: line 1: A: 3: must use subscript when assigning associative array |
osh | 2 Can't initialize assoc array with indexed array [osh status] Expected 1, got 0 stdout: stderr: |
osh_ALT | 2 Can't initialize assoc array with indexed array [osh_ALT status] Expected 1, got 0 stdout: stderr: |
bash | 3 Initializing indexed array with assoc array stdout: ['3']stderr: |
osh | 3 Initializing indexed array with assoc array [osh stdout] Expected u'', got "['2', '1', '3']\n" [osh status] Expected 1, got 0 stdout: ['2', '1', '3']stderr: |
osh_ALT | 3 Initializing indexed array with assoc array [osh_ALT stdout] Expected u'', got "['2', '1', '3']\n" [osh_ALT status] Expected 1, got 0 stdout: ['2', '1', '3']stderr: |
osh | 7 coerce to string with ${A[*]}, etc. [osh stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n", got "['xx', 'yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" stdout: ['xx', 'yy'] ['X X Y Y'] ['xx', 'yy'] ['X', 'X', 'Y', 'Y']stderr: |
osh_ALT | 7 coerce to string with ${A[*]}, etc. [osh_ALT stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n", got "['xx', 'yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n" stdout: ['xx', 'yy'] ['X X Y Y'] ['xx', 'yy'] ['X', 'X', 'Y', 'Y']stderr: |
osh | 10 ${assoc} disallowed in OSH, like ${assoc[0]} in bash stdout: stderr: echo "${a}" ^~ [ stdin ]:3: fatal: Array 'a' can't be referred to as a scalar (without @ or *) |
osh_ALT | 10 ${assoc} disallowed in OSH, like ${assoc[0]} in bash stdout: stderr: echo "${a}" ^~ [ stdin ]:3: fatal: Array 'a' can't be referred to as a scalar (without @ or *) |
bash | 16 lookup by unquoted string doesn't work in OSH because it's a variable stdout: cstderr: |
bash | 17 bash bug: "i+1" and i+1 are the same key stdout: array[i]=6 array[i+1]=7 assoc[i]=string assoc[i+1]=string+1 assoc[i]=string assoc[i+1]=string+1stderr: |
bash | 21 Slice of associative array doesn't make sense in bash stdout: ['2', '1', '5'] ['2', '1', '5'] ['1', '5', '4'] ['5', '4', '3'] ['4', '3'] ['3']stderr: |
osh | 22 bash variable can have an associative array part and a string part stdout: stderr: echo ${assoc[1]} ${assoc[2]} ${assoc} ^~ [ stdin ]:4: fatal: Array 'assoc' can't be referred to as a scalar (without @ or *) |
osh_ALT | 22 bash variable can have an associative array part and a string part stdout: stderr: echo ${assoc[1]} ${assoc[2]} ${assoc} ^~ [ stdin ]:4: fatal: Array 'assoc' can't be referred to as a scalar (without @ or *) |
osh | 23 Associative array expressions inside (( )) with keys that look like numbers stdout: 42stderr: (( var = assoc[0] )) ^~ [ stdin ]:5: fatal: Can't evaluate associative arrays in arithmetic contexts |
osh_ALT | 23 Associative array expressions inside (( )) with keys that look like numbers stdout: 42stderr: (( var = assoc[0] )) ^~ [ stdin ]:5: fatal: Can't evaluate associative arrays in arithmetic contexts |