spec test index / oilshell.org
60 passed, 6 OK, 3 not implemented, 0 BUG, 42 failed, 0 timeouts, 0 cases skipped 4 failed under osh
osh_.py | 1 set associative array to indexed array literal (very surprising bash behavior) [osh_.py stdout] Expected "foo\nspam eggs\nk1\nk2\n['foo', 'spam eggs']\n['0', '1']\n", got "(cmd_value.Argv argv:[argv.py foo 'spam eggs'] arg_spids:[87 89 89])\n(cmd_value.Argv argv:[argv.py 0 1] arg_spids:[98 100 100])\n" stdout: (cmd_value.Argv argv:[argv.py foo 'spam eggs'] arg_spids:[87 89 89]) (cmd_value.Argv argv:[argv.py 0 1] arg_spids:[98 100 100])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 1 set associative array to indexed array literal (very surprising bash behavior) [osh_.cc stdout] Expected "foo\nspam eggs\nk1\nk2\n['foo', 'spam eggs']\n['0', '1']\n", got "(cmd_value.Argv argv:[argv.py foo 'spam eggs'] arg_spids:[87 89 89])\n(cmd_value.Argv argv:[argv.py 0 1] arg_spids:[98 100 100])\n" stdout: (cmd_value.Argv argv:[argv.py foo 'spam eggs'] arg_spids:[87 89 89]) (cmd_value.Argv argv:[argv.py 0 1] arg_spids:[98 100 100])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 2 Can't initialize assoc array with indexed array [osh_.cc stdout] Expected 'status=2\n', got 'status=0\n' stdout: status=0stderr: |
osh_.py | 3 Initializing indexed array with assoc array [osh_.py stdout] Expected 'status=2\n[]\n', got 'status=2\n(cmd_value.Argv argv:[argv.py] arg_spids:[27])\n' stdout: status=2 (cmd_value.Argv argv:[argv.py] arg_spids:[27])stderr: declare -a a=([xx]=1 [yy]=2 [zz]=3) ^~ [ stdin ]:1: 'declare' Got -a but RHS isn't an array Unhandled SimpleCommand |
osh_.cc | 3 Initializing indexed array with assoc array [osh_.cc stdout] Expected 'status=2\n[]\n', got 'status=2\n(cmd_value.Argv argv:[argv.py] arg_spids:[27])\n' stdout: status=2 (cmd_value.Argv argv:[argv.py] arg_spids:[27])stderr: declare -a a=([xx]=1 [yy]=2 [zz]=3) ^~ [ stdin ]:1: 'declare' Got -a but RHS isn't an array Unhandled SimpleCommand |
osh_.py | 4 create empty assoc array, put, then get [osh_.py stdout] Expected '[]\n[]\nbar\n', got '(cmd_value.Argv argv:[argv.py] arg_spids:[9])\n(cmd_value.Argv argv:[argv.py] arg_spids:[20])\nbar\n' stdout: (cmd_value.Argv argv:[argv.py] arg_spids:[9]) (cmd_value.Argv argv:[argv.py] arg_spids:[20]) barstderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 4 create empty assoc array, put, then get [osh_.cc stdout] Expected '[]\n[]\nbar\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:644: List<V> *Dict<Str *, Str *>::values() [K = Str *, V = Str *]: Assertion `0' failed. |
osh_.py | 5 Empty value (doesn't use EmptyWord?) [osh_.py stdout] Expected "['']\n", got "(cmd_value.Argv argv:[argv.py ''] arg_spids:[14 16])\n" stdout: (cmd_value.Argv argv:[argv.py ''] arg_spids:[14 16])stderr: Unhandled SimpleCommand |
osh_.cc | 5 Empty value (doesn't use EmptyWord?) [osh_.cc stdout] Expected "['']\n", got "(cmd_value.Argv argv:[argv.py ''] arg_spids:[14 16])\n" stdout: (cmd_value.Argv argv:[argv.py ''] arg_spids:[14 16])stderr: Unhandled SimpleCommand |
osh_.py | 6 retrieve keys with ! [osh_.py stdout] Expected 'a+1\nfoo\nx\n', got '' stdout: stderr: |
osh_.cc | 6 retrieve keys with ! [osh_.cc stdout] Expected 'a+1\nfoo\nx\n', got '' stdout: stderr: |
osh_.py | 7 retrieve values with ${A[@]} [osh_.py stdout] Expected 'b\nbar\nc\n', got '' stdout: stderr: |
osh_.cc | 7 retrieve values with ${A[@]} [osh_.cc stdout] Expected 'b\nbar\nc\n', got '' stdout: stderr: |
osh | 8 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_.py | 8 coerce to string with ${A[*]}, etc. [osh_.py stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n", got "(cmd_value.Argv argv:[argv.py xx yy] arg_spids:[28 30 30])\n(cmd_value.Argv argv:[argv.py 'X X Y Y'] arg_spids:[39 41])\n(cmd_value.Argv argv:[argv.py xx yy] arg_spids:[51 53 53])\n(cmd_value.Argv argv:[argv.py X X Y Y] arg_spids:[60 62 62 62 62])\n" stdout: (cmd_value.Argv argv:[argv.py xx yy] arg_spids:[28 30 30]) (cmd_value.Argv argv:[argv.py 'X X Y Y'] arg_spids:[39 41]) (cmd_value.Argv argv:[argv.py xx yy] arg_spids:[51 53 53]) (cmd_value.Argv argv:[argv.py X X Y Y] arg_spids:[60 62 62 62 62])stderr: Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 8 coerce to string with ${A[*]}, etc. [osh_.cc stdout] Expected "['xx yy']\n['X X Y Y']\n['xx', 'yy']\n['X', 'X', 'Y', 'Y']\n", got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:644: List<V> *Dict<Str *, Str *>::values() [K = Str *, V = Str *]: Assertion `0' failed. |
osh_.py | 9 ${A[@]/b/B} [osh_.py stdout] Expected 'BBB\nccc\nddd\n', got '' stdout: stderr: |
osh_.cc | 9 ${A[@]/b/B} [osh_.cc stdout] Expected 'BBB\nccc\nddd\n', got '' stdout: stderr: |
osh_.py | 10 ${A[@]#prefix} [osh_.py stdout] Expected 'hree\none\nwo\n', got '' stdout: stderr: |
osh_.cc | 10 ${A[@]#prefix} [osh_.cc stdout] Expected 'hree\none\nwo\n', got '' stdout: stderr: |
osh | 11 ${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_.py | 11 ${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_.cc | 11 ${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_.cc | 12 length ${#a[@]} [osh_.cc stdout] Expected '3\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:769: int len(const Dict<K, V> *) [K = Str *, V = Str *]: Assertion `0' failed. |
osh_.py | 19 Array stored in associative array gets converted to string (without strict_array) [osh_.py stdout] Expected "['1 2 3']\n", got "(cmd_value.Argv argv:[argv.py '1 2 3'] arg_spids:[33 35])\n" stdout: (cmd_value.Argv argv:[argv.py '1 2 3'] arg_spids:[33 35])stderr: Unhandled SimpleCommand |
osh_.cc | 19 Array stored in associative array gets converted to string (without strict_array) [osh_.cc stdout] Expected "['1 2 3']\n", got "(cmd_value.Argv argv:[argv.py '1 2 3'] arg_spids:[33 35])\n" stdout: (cmd_value.Argv argv:[argv.py '1 2 3'] arg_spids:[33 35])stderr: Unhandled SimpleCommand |
osh_.py | 20 Indexed array as key of associative array coerces to string (without shopt -s strict_array) [osh_.py stdout] Expected 'foo\n1 2 3\n42\n', got 'foo\n' stdout: foostderr: |
osh_.cc | 20 Indexed array as key of associative array coerces to string (without shopt -s strict_array) [osh_.cc stdout] Expected 'foo\n1 2 3\n42\n', got 'foo\n' stdout: foostderr: |
osh_.py | 21 Append to associative array value A['x']+='suffix' [osh_.py stdout] Expected "['foobarbar']\n", got '(cmd_value.Argv argv:[argv.py foobarbar] arg_spids:[45 47])\n' stdout: (cmd_value.Argv argv:[argv.py foobarbar] arg_spids:[45 47])stderr: Unhandled SimpleCommand |
osh_.cc | 21 Append to associative array value A['x']+='suffix' [osh_.cc stdout] Expected "['foobarbar']\n", got '' [osh_.cc status] Expected 0, got -11 stdout: stderr: |
osh | 23 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_.py | 23 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_.cc | 23 bash variable can have an associative array part and a string part stdout: stderr: assoc[2]=2 ^ [ array LValue in TODO ]:3: fatal: Array 'assoc' can't be referred to as a scalar (without @ or *) |
osh_.cc | 25 (( A[5] += 42 )) [osh_.cc stdout] Expected '16\n', got '' [osh_.cc status] Expected 0, got -11 stdout: stderr: |
osh_.cc | 26 (( A[5] += 42 )) with empty cell [osh_.cc stdout] Expected '6\n', got '' [osh_.cc status] Expected 0, got -11 stdout: stderr: |
osh | 28 readonly associative array can't be modified stdout: stderr: A['x']=1 ^~ [ stdin ]:2: fatal: Can't assign to readonly associative array |
osh_.py | 28 readonly associative array can't be modified stdout: stderr: A['x']=1 ^~ [ stdin ]:2: fatal: Can't assign to readonly associative array |
osh_.cc | 28 readonly associative array can't be modified stdout: stderr: A['x']=1 ^~ [ stdin ]:2: fatal: Can't assign to readonly associative array |
osh_.cc | 29 associative array and brace expansion [osh_.cc stdout] Expected 'v\n-{a,b}-\n', got '\n\n' stdout: stderr: |
osh_.cc | 32 declare -A A=() alowed [osh_.cc stdout] Expected 'len=0\nlen=1\nunset len=0\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:769: int len(const Dict<K, V> *) [K = Str *, V = Str *]: Assertion `0' failed. |
osh_.py | 33 unset -v and assoc array [osh_.py stdout] Expected 'len=1\nlen=0\nlen=1\nlen=0\nlen=1\nlen=0\n', got 'len=1\nlen=0\nlen=1\nlen=0\nlen=1\nlen=1\n' stdout: len=1 len=0 len=1 len=0 len=1 len=1stderr: |
osh_.cc | 33 unset -v and assoc array [osh_.cc stdout] Expected 'len=1\nlen=0\nlen=1\nlen=0\nlen=1\nlen=0\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:769: int len(const Dict<K, V> *) [K = Str *, V = Str *]: Assertion `0' failed. |
osh | 34 nameref and assoc array [osh stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n', got 'values: val\nbefore A["K"]\nafter val2\nvalues: val\n---\nbefore A[$key]\nafter val3\nvalues: val\n' stdout: values: val before A["K"] after val2 values: val --- before A[$key] after val3 values: valstderr: |
osh_.py | 34 nameref and assoc array [osh_.py stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n', got 'values: val\nbefore A["K"]\nafter val2\nvalues: val\n---\nbefore A[$key]\nafter val3\nvalues: val\n' stdout: values: val before A["K"] after val2 values: val --- before A[$key] after val3 values: valstderr: |
osh_.cc | 34 nameref and assoc array [osh_.cc stdout] Expected 'values: val\nbefore val\nafter val2\nvalues: val2\n---\nbefore val2\nafter val3\nvalues: val3\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:644: List<V> *Dict<Str *, Str *>::values() [K = Str *, V = Str *]: Assertion `0' failed. |
osh | 35 ${!ref} and assoc array [osh stdout] Expected 'values: val\nref val\nref val\n', got 'values: val\nref\nref\n' stdout: values: val ref refstderr: |
osh_.py | 35 ${!ref} and assoc array [osh_.py stdout] Expected 'values: val\nref val\nref val\n', got 'values: val\nref\nref\n' stdout: values: val ref refstderr: |
osh_.cc | 35 ${!ref} and assoc array [osh_.cc stdout] Expected 'values: val\nref val\nref val\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:644: List<V> *Dict<Str *, Str *>::values() [K = Str *, V = Str *]: Assertion `0' failed. |
osh | 36 printf -v and assoc array [osh stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n', got 'values: val\nvalues: val\nvalues: val\n' stdout: values: val values: val values: valstderr: printf -v 'assoc["K"]' '/%s/' val2 ^~~~~~ [ stdin ]:6: 'printf' got invalid variable name 'assoc["K"]' printf -v 'assoc[$key]' '/%s/' val3 ^~~~~~ [ stdin ]:9: 'printf' got invalid variable name 'assoc[$key]' |
osh_.py | 36 printf -v and assoc array [osh_.py stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n', got 'values: val\nvalues: val\nvalues: val\n' stdout: values: val values: val values: valstderr: |
osh_.cc | 36 printf -v and assoc array [osh_.cc stdout] Expected 'values: val\nvalues: /val2/\nvalues: /val3/\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:644: List<V> *Dict<Str *, Str *>::values() [K = Str *, V = Str *]: Assertion `0' failed. |