spec test index / oilshell.org
status | osh | osh_.py | osh_.cc | |
pass | 11 | 10 | 9 | |
ok | 1 | 1 | 1 | |
N-I | 1 | 1 | 1 | |
FAIL | 3 | 4 | 5 | |
total | 16 | 16 | 16 | |
case | osh | osh_.py | osh_.cc | description |
0 | pass | pass | pass | var ref ${!a} |
1 | pass | pass | pass | ${!ref-default} |
2 | pass | pass | pass | ${!undef:-} |
3 | pass | FAIL | FAIL | comparison to ${!array[@]} keys (similar SYNTAX) |
details | details | |||
4 | pass | pass | pass | ${!a[@]-'default'} is illegal |
5 | pass | pass | pass | ref to $@ with @ |
6 | pass | pass | pass | ref to $1 and $2 with 1 and 2 |
7 | FAIL | FAIL | FAIL | var ref with 1 and @ and * |
details | details | details | ||
8 | pass | pass | pass | var ref to special var BASH_SOURCE |
9 | N-I | N-I | N-I | var ref to $? with '?' (not in Oil) |
details | details | details | ||
10 | FAIL | FAIL | FAIL | indirection, *then* fancy expansion features |
details | details | details | ||
11 | FAIL | FAIL | FAIL | indirection *to* an array reference |
details | details | details | ||
12 | pass | pass | FAIL | indirection to nasty complex array references |
details | ||||
13 | pass | pass | pass | indirection *to* fancy expansion features bash disallows |
14 | ok | ok | ok | Bad var ref with ${!a} |
details | details | details | ||
15 | pass | pass | pass | ${!OPTIND} (used by bash completion |
30 passed, 3 OK, 3 not implemented, 0 BUG, 12 failed, 0 timeouts, 0 cases skipped 3 failed under osh
osh_.py | 3 comparison to ${!array[@]} keys (similar SYNTAX) [osh_.py stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\n['']\nA_nobrackets=0\n", got 'a_keys=127\na_nobrackets=127\n---\nA_keys=127\nA_nobrackets=127\n' stdout: a_keys=127 a_nobrackets=127 --- A_keys=127 A_nobrackets=127stderr: argv.py "${!a[@]}" ^~~~~~~ [ stdin ]:3: 'argv.py' not found argv.py "${!a}" # missing [] is equivalent to ${!a[0]} ? ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py ${!A[@]} ^~~~~~~ [ stdin ]:9: 'argv.py' not found argv.py "${!A}" # missing [] is equivalent to ${!A[0]} ? ^~~~~~~ [ stdin ]:11: 'argv.py' not found |
osh_.cc | 3 comparison to ${!array[@]} keys (similar SYNTAX) [osh_.cc stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\n['']\nA_nobrackets=0\n", got 'a_keys=127\na_nobrackets=127\n---\nA_keys=127\nA_nobrackets=127\n' stdout: a_keys=127 a_nobrackets=127 --- A_keys=127 A_nobrackets=127stderr: argv.py "${!a[@]}" ^~~~~~~ [ stdin ]:3: 'argv.py' not found argv.py "${!a}" # missing [] is equivalent to ${!a[0]} ? ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py ${!A[@]} ^~~~~~~ [ stdin ]:9: 'argv.py' not found argv.py "${!A}" # missing [] is equivalent to ${!A[0]} ? ^~~~~~~ [ stdin ]:11: 'argv.py' not found |
osh | 7 var ref with 1 and @ and * [osh stdout] Expected '|x|\n|x|y|\n|x y|\n', got '|x|\n|x|y|\n|x|y|\n' stdout: |x| |x|y| |x|y|stderr: |
osh_.py | 7 var ref with 1 and @ and * [osh_.py stdout] Expected '|x|\n|x|y|\n|x y|\n', got '|x|\n|x|y|\n|x|y|\n' stdout: |x| |x|y| |x|y|stderr: |
osh_.cc | 7 var ref with 1 and @ and * [osh_.cc stdout] Expected '|x|\n|x|y|\n|x y|\n', got '|x|\n|x|y|\n|x|y|\n' stdout: |x| |x|y| |x|y|stderr: |
osh | 9 var ref to $? with '?' (not in Oil) stdout: myfuncstderr: echo ${!ref} ^~~ [ stdin ]:3: fatal: Bad indirect expansion: '?' |
osh_.py | 9 var ref to $? with '?' (not in Oil) stdout: myfuncstderr: echo ${!ref} ^~~ [ stdin ]:3: fatal: Bad indirect expansion: '?' |
osh_.cc | 9 var ref to $? with '?' (not in Oil) stdout: myfuncstderr: echo ${!ref} ^~~~ [ stdin ]:3: fatal: Bad indirect expansion: '?' |
osh | 10 indirection, *then* fancy expansion features [osh stdout] Expected 'ok\n', got "${!b[1]} -> expected asdf, got asdf x\n$zz -> expected foo, got \nbar vs foo\n$zz -> expected foo, got \nbad err msg: ${!w:?oops} -> ${!w:?oops}\n ^\n[ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops'\n${!x^a} -> expected Aaabcc, got \nok\n" stdout: ${!b[1]} -> expected asdf, got asdf x $zz -> expected foo, got bar vs foo $zz -> expected foo, got bad err msg: ${!w:?oops} -> ${!w:?oops} ^ [ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops' ${!x^a} -> expected Aaabcc, got okstderr: echo "${!x^a}" ^ [ eval at line 5 of (source.Stdin comment:'') ]:5: fatal: Id.VOp1_Caret can't have an argument |
osh_.py | 10 indirection, *then* fancy expansion features [osh_.py stdout] Expected 'ok\n', got "${!b[1]} -> expected asdf, got asdf x\n$zz -> expected foo, got \nbar vs foo\n$zz -> expected foo, got \nbad err msg: ${!w:?oops} -> ${!w:?oops}\n ^\n[ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops'\n${!x^a} -> expected Aaabcc, got \nok\n" stdout: ${!b[1]} -> expected asdf, got asdf x $zz -> expected foo, got bar vs foo $zz -> expected foo, got bad err msg: ${!w:?oops} -> ${!w:?oops} ^ [ eval at line 10 of (source.Stdin comment:'') ]:10: fatal: unset variable 'oops' ${!x^a} -> expected Aaabcc, got okstderr: echo "${!x^a}" ^ [ eval at line 5 of (source.Stdin comment:'') ]:5: fatal: Id.VOp1_Caret can't have an argument |
osh_.cc | 10 indirection, *then* fancy expansion features [osh_.cc stdout] Expected 'ok\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh | 11 indirection *to* an array reference [osh stdout] Expected '.\n.x\n.x.y\n.x y\n', got '.\n.x\n.x.y\n.x.y\n' stdout: . .x .x.y .x.ystderr: |
osh_.py | 11 indirection *to* an array reference [osh_.py stdout] Expected '.\n.x\n.x.y\n.x y\n', got '.\n.x\n.x.y\n.x.y\n' stdout: . .x .x.y .x.ystderr: |
osh_.cc | 11 indirection *to* an array reference [osh_.cc stdout] Expected '.\n.x\n.x.y\n.x y\n', got '.\n.x\n.x.y\n.x.y\n' stdout: . .x .x.y .x.ystderr: |
osh_.cc | 12 indirection to nasty complex array references [osh_.cc stdout] Expected '1 end\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
osh | 14 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |
osh_.py | 14 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |
osh_.cc | 14 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^~~~ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |