spec test index / oilshell.org
status | osh | osh_.py | osh_.cc | |
pass | 8 | 7 | 7 | |
ok | 1 | 1 | 1 | |
N-I | 1 | 1 | 1 | |
FAIL | 3 | 4 | 4 | |
total | 13 | 13 | 13 | |
case | osh | osh_.py | osh_.cc | 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 | FAIL | FAIL | FAIL | var ref with 1 and @ and * |
details | details | details | ||
4 | pass | pass | pass | var ref to special var BASH_SOURCE |
5 | N-I | N-I | N-I | var ref to $? with '?' (not in Oil) |
details | details | details | ||
6 | FAIL | FAIL | FAIL | indirection, *then* fancy expansion features |
details | details | details | ||
7 | FAIL | FAIL | FAIL | indirection *to* an array reference |
details | details | details | ||
8 | pass | FAIL | FAIL | indirection to nasty complex array references |
details | details | |||
9 | pass | pass | pass | indirection *to* fancy expansion features bash disallows |
10 | ok | ok | ok | Bad var ref with ${!a} |
details | details | details | ||
11 | pass | pass | pass | ${!OPTIND} (used by bash completion |
12 | pass | pass | pass | ${!ref-default} |
22 passed, 3 OK, 3 not implemented, 0 BUG, 11 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_.py | 3 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 | 3 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 | 5 var ref to $? with '?' (not in Oil) stdout: myfuncstderr: echo ${!ref} ^~~ [ stdin ]:3: fatal: Bad indirect expansion: '?' |
osh_.py | 5 var ref to $? with '?' (not in Oil) stdout: myfuncstderr: echo ${!ref} ^~~ [ stdin ]:3: fatal: Bad indirect expansion: '?' |
osh_.cc | 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 \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 | 6 indirection, *then* fancy expansion features [osh_.py stdout] Expected 'ok\n', got 'bad success: ${!!xd}\nbad success: ${!!x*}\nbad success: ${!!a[*]}\nbad success: ${!#x}\nbad success: ${!#a[@]}\n${!a[1]} -> expected xx, got \n${!b[1]} -> expected asdf, got \n${!y:-foo} -> expected foo, got \n${!x:-foo} -> expected aaabcc, got \n$zz -> expected foo, got \nbar vs foo\n$zz -> expected foo, got \nbad success: ${!w:?oops}\nbad err msg: ${!w:?oops} -> \n${!x:?oops} -> expected aaabcc, got \n${!x:+foo} -> expected foo, got \n${!x:2} -> expected abcc, got \n${!x:2:2} -> expected ab, got \n${!x#*a} -> expected aabcc, got \n${!x%%c*} -> expected aaab, got \n${!x/a*b/d} -> expected dcc, got \n${!x^a} -> expected Aaabcc, got \n${!p@P} -> expected $ , got \nok\n' stdout: bad success: ${!!xd} bad success: ${!!x*} bad success: ${!!a[*]} bad success: ${!#x} bad success: ${!#a[@]} ${!a[1]} -> expected xx, got ${!b[1]} -> expected asdf, got ${!y:-foo} -> expected foo, got ${!x:-foo} -> expected aaabcc, got $zz -> expected foo, got bar vs foo $zz -> expected foo, got bad success: ${!w:?oops} bad err msg: ${!w:?oops} -> ${!x:?oops} -> expected aaabcc, got ${!x:+foo} -> expected foo, got ${!x:2} -> expected abcc, got ${!x:2:2} -> expected ab, got ${!x#*a} -> expected aabcc, got ${!x%%c*} -> expected aaab, got ${!x/a*b/d} -> expected dcc, got ${!x^a} -> expected Aaabcc, got ${!p@P} -> expected $ , got okstderr: |
osh_.cc | 6 indirection, *then* fancy expansion features [osh_.cc stdout] Expected 'ok\n', got 'bad success: ${!!xd}\nbad success: ${!!x*}\nbad success: ${!!a[*]}\nbad success: ${!#x}\nbad success: ${!#a[@]}\n${!a[1]} -> expected xx, got \n${!b[1]} -> expected asdf, got \n${!y:-foo} -> expected foo, got \n${!x:-foo} -> expected aaabcc, got \n$zz -> expected foo, got \nbar vs foo\n$zz -> expected foo, got \nbad success: ${!w:?oops}\nbad err msg: ${!w:?oops} -> \n${!x:?oops} -> expected aaabcc, got \n${!x:+foo} -> expected foo, got \n${!x:2} -> expected abcc, got \n${!x:2:2} -> expected ab, got \n${!x#*a} -> expected aabcc, got \n${!x%%c*} -> expected aaab, got \n${!x/a*b/d} -> expected dcc, got \n${!x^a} -> expected Aaabcc, got \n${!p@P} -> expected $ , got \nok\n' stdout: bad success: ${!!xd} bad success: ${!!x*} bad success: ${!!a[*]} bad success: ${!#x} bad success: ${!#a[@]} ${!a[1]} -> expected xx, got ${!b[1]} -> expected asdf, got ${!y:-foo} -> expected foo, got ${!x:-foo} -> expected aaabcc, got $zz -> expected foo, got bar vs foo $zz -> expected foo, got bad success: ${!w:?oops} bad err msg: ${!w:?oops} -> ${!x:?oops} -> expected aaabcc, got ${!x:+foo} -> expected foo, got ${!x:2} -> expected abcc, got ${!x:2:2} -> expected ab, got ${!x#*a} -> expected aabcc, got ${!x%%c*} -> expected aaab, got ${!x/a*b/d} -> expected dcc, got ${!x^a} -> expected Aaabcc, got ${!p@P} -> expected $ , got okstderr: |
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_.py | 7 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 | 7 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_.py | 8 indirection to nasty complex array references [osh_.py stdout] Expected '1 end\n', got 'end\n' stdout: endstderr: |
osh_.cc | 8 indirection to nasty complex array references [osh_.cc stdout] Expected '1 end\n', got 'end\n' stdout: endstderr: |
osh | 10 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |
osh_.py | 10 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |
osh_.cc | 10 Bad var ref with ${!a} stdout: stderr: echo ref ${!a} ^~~~ [ stdin ]:2: fatal: Bad indirect expansion: 'bad var name' |