spec test index / oilshell.org
status | bash | osh | osh_ALT | |
pass | 11 | 8 | 8 | |
ok | 2 | 1 | 1 | |
N-I | 0 | 1 | 1 | |
FAIL | 0 | 3 | 3 | |
total | 13 | 13 | 13 | |
case | bash | osh | osh_ALT | description |
0 | pass | pass | pass | var ref ${!a} |
1 | pass | pass | pass | ref to $@ with @ |
2 | pass | pass | pass | ref to $1 and $2 with 1 and 2 |
3 | pass | FAIL | FAIL | var ref with 1 and @ and * |
details | details | |||
4 | pass | pass | pass | var ref to special var BASH_SOURCE |
5 | pass | N-I | N-I | var ref to $? with '?' (not in Oil) |
details | details | |||
6 | pass | FAIL | FAIL | indirection, *then* fancy expansion features |
details | details | |||
7 | pass | FAIL | FAIL | indirection *to* an array reference |
details | details | |||
8 | ok | pass | pass | indirection to nasty complex array references |
details | ||||
9 | ok | pass | pass | indirection *to* fancy expansion features bash disallows |
details | ||||
10 | pass | ok | ok | Bad var ref with ${!a} |
details | details | |||
11 | pass | pass | pass | ${!OPTIND} (used by bash completion |
12 | pass | pass | pass | ${!ref-default} |
27 passed, 4 OK, 2 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped 3 failed under osh
osh | 3 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_ALT | 3 var ref with 1 and @ and * [osh_ALT 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 | 5 var ref to $? with '?' (not in Oil) stdout: myfuncstderr: echo ${!ref} ^~~ [ stdin ]:3: fatal: Bad indirect expansion: '?' |
osh_ALT | 5 var ref to $? with '?' (not in Oil) stdout: myfuncstderr: echo ${!ref} ^~~ [ stdin ]:3: fatal: Bad indirect expansion: '?' |
osh | 6 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 \n${!p@P} -> expected $ , got p pp\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 ${!p@P} -> expected $ , got p pp okstderr: echo "${!x^a}" ^~~~ [ eval at line 5 of (source.Stdin comment:'') ]:5: fatal: Id.VOp1_Caret can't have an argument |
osh_ALT | 6 indirection, *then* fancy expansion features [osh_ALT 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 \n${!p@P} -> expected $ , got p pp\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 ${!p@P} -> expected $ , got p pp okstderr: echo "${!x^a}" ^~~~ [ eval at line 5 of (source.Stdin comment:'') ]:5: fatal: Id.VOp1_Caret can't have an argument |
osh | 7 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_ALT | 7 indirection *to* an array reference [osh_ALT 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: |
bash | 8 indirection to nasty complex array references stdout: 1 7 8 9 10 11 endstderr: main: line 4: {1,0}: syntax error: operand expected (error token is "{1,0}") main: line 4: <(echo x): syntax error: operand expected (error token is "<(echo x)") main: line 4: 1 0: syntax error in expression (error token is "0") main: line 4: b*: syntax error: operand expected (error token is "*") main: line 4: a[1"]: bad substitution |
bash | 9 indirection *to* fancy expansion features bash disallows stdout: donestderr: main: line 2: a[0: bad substitution main: line 2: aa[k: bad substitution main: line 2: !x: bad substitution main: line 2: !a[0]: bad substitution main: line 2: x:-foo: bad substitution main: line 2: x:=foo: bad substitution main: line 2: x:?oops: bad substitution main: line 2: x:+yy: bad substitution main: line 2: x:0: bad substitution main: line 2: x:0:1: bad substitution main: line 2: !a@: bad substitution main: line 2: #x: bad substitution main: line 2: x#y: bad substitution main: line 2: x/y/foo: bad substitution main: line 2: x@Q: bad substitution |
osh | 10 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |
osh_ALT | 10 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |