spec test index / oilshell.org
91 passed, 6 OK, 3 not implemented, 0 BUG, 14 failed, 0 timeouts, 0 cases skipped 2 failed under osh
| 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 '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
| osh_.cc | 3 Initializing indexed array with assoc array [osh_.cc stdout] Expected 'status=2\n[]\n', got '[]\nstatus=2\n' stdout: [] status=2stderr: declare -a a=([xx]=1 [yy]=2 [zz]=3)
^~
[ stdin ]:1: 'declare' Got -a but RHS isn't an array
dumb_alloc:
gNumNew = 2092
gNumDelete = 187
gMemPos = 72032
gNumMalloc = 153
gNumFree = 0
gMemPos2 = 11664
|
| osh_.cc | 6 retrieve keys with ! [osh_.cc stdout] Expected 'a+1\nfoo\nx\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
| osh_.cc | 7 retrieve values with ${A[@]} [osh_.cc stdout] Expected 'b\nbar\nc\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
| 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 "['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_.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 "['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: dumb_alloc: gNumNew = 2358 gNumDelete = 250 gMemPos = 80144 gNumMalloc = 236 gNumFree = 0 gMemPos2 = 12960 |
| osh_.cc | 9 ${A[@]/b/B} [osh_.cc stdout] Expected 'BBB\nccc\nddd\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
| osh_.cc | 10 ${A[@]#prefix} [osh_.cc stdout] Expected 'hree\none\nwo\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
| 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 *)
dumb_alloc:
gNumNew = 1924
gNumDelete = 160
gMemPos = 66720
gNumMalloc = 85
gNumFree = 0
gMemPos2 = 10544
|
| 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 '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
| 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: echo ${assoc[1]} ${assoc[2]} ${assoc}
^~~~
[ stdin ]:4: fatal: Array 'assoc' can't be referred to as a scalar (without @ or *)
dumb_alloc:
gNumNew = 1980
gNumDelete = 164
gMemPos = 68160
gNumMalloc = 107
gNumFree = 0
gMemPos2 = 10928
|
| 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 dumb_alloc: gNumNew = 1800 gNumDelete = 139 gMemPos = 63168 gNumMalloc = 49 gNumFree = 0 gMemPos2 = 9968 |
| 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.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): 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 '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: dumb_alloc: gNumNew = 3642 gNumDelete = 444 gMemPos = 115296 gNumMalloc = 655 gNumFree = 0 gMemPos2 = 19712 |