spec test index / oilshell.org
status | osh | osh-cpp | |
pass | 12 | 9 | |
FAIL | 4 | 7 | |
total | 16 | 16 | |
case | osh | osh-cpp | description |
0 | pass | FAIL | cd with block |
details | |||
1 | pass | pass | cd with block: fatal error in block |
2 | pass | pass | cd with block: return in block |
3 | pass | pass | cd with block: break in block |
4 | pass | pass | cd with block exits with status 0 |
5 | pass | FAIL | block doesn't have its own scope |
details | |||
6 | FAIL | FAIL | block literal in expression mode: ^(echo $PWD) |
details | details | ||
7 | FAIL | FAIL | block arg as typed expression |
details | details | ||
8 | pass | pass | Pass invalid typed args |
9 | pass | pass | 'builtin' and 'command' with block |
10 | pass | pass | Consistency: Control Flow and Blocks |
11 | pass | pass | Consistency: Exit Status and Blocks |
12 | pass | FAIL | Consistency: Unwanted Blocks Are Errors |
details | |||
13 | pass | pass | Block with Bare Assignments |
14 | FAIL | FAIL | Block param binding |
details | details | ||
15 | FAIL | FAIL | Proc that doesn't take a block |
details | details |
21 passed, 0 OK, 0 not implemented, 0 BUG, 11 failed, 0 timeouts, 0 cases skipped 4 failed under osh
osh-cpp | 0 cd with block [osh-cpp stdout] Expected '/\nOLDPWD=\ndone\nPWD=/tmp\npwd builtin: /tmp\n' Got '/\nOLDPWD=\ndone\n' [osh-cpp status] Expected 0, got 1 stdout: / OLDPWD= donestderr: if ! test "$saved" = $PWD; then ^~~~~~ [ stdin ]:7: fatal: Undefined variable 'saved' |
osh-cpp | 5 block doesn't have its own scope [osh-cpp stdout] Expected 'x=1\nx=42\nx=42\n', got '' [osh-cpp status] Expected 0, got 1 stdout: stderr: echo "x=$x" ^~ [ stdin ]:3: fatal: Undefined variable 'x' |
osh | 6 block literal in expression mode: ^(echo $PWD) [osh stdout] Expected 'one\ntwo\n', got "(Str) 'TODO: value.Block'\n(Str) 'TODO: value.Block'\n" stdout: (Str) 'TODO: value.Block' (Str) 'TODO: value.Block'stderr: |
osh-cpp | 6 block literal in expression mode: ^(echo $PWD) [osh-cpp stdout] Expected 'one\ntwo\n', got '' stdout: stderr: |
osh | 7 block arg as typed expression [osh stdout] Expected '/tmp\n/tmp\n', got '/tmp\n' [osh status] Expected 0, got 2 stdout: /tmpstderr: cd /tmp (myblock) ^ [ stdin ]:6: 'cd' Expected block argument cd /tmp (myblock) ^~ [ stdin ]:6: errexit PID 22891: command.Simple failed with status 2 |
osh-cpp | 7 block arg as typed expression [osh-cpp stdout] Expected '/tmp\n/tmp\n', got '/tmp\n' [osh-cpp status] Expected 0, got 2 stdout: /tmpstderr: cd /tmp (myblock) ^ [ stdin ]:6: 'cd' Expected block argument cd /tmp (myblock) ^~ [ stdin ]:6: errexit PID 22956: command.Simple failed with status 2 |
osh-cpp | 12 Consistency: Unwanted Blocks Are Errors [osh-cpp stdout] Expected 'true 2\nfalse 2\necho block 2\necho args 2\ncommand echo 2\nbuiltin echo 2\npushd 2\n' Got 'true 2\nfalse 2\n\necho block 0\n\necho args 0\ncommand block\ncommand echo 0\nbuiltin block\nbuiltin echo 0\n/home/andy/git/oilshell/oil/_tmp/spec-tmp/ysh-blocks.test.sh/12-osh-cpp /home/andy/git/oilshell/oil/_tmp/spec-tmp/ysh-blocks.test.sh/12-osh-cpp\npushd 0\n' stdout: true 2 false 2 echo block 0 echo args 0 command block command echo 0 builtin block builtin echo 0 /home/andy/git/oilshell/oil/_tmp/spec-tmp/ysh-blocks.test.sh/12-osh-cpp /home/andy/git/oilshell/oil/_tmp/spec-tmp/ysh-blocks.test.sh/12-osh-cpp pushd 0stderr: true { echo BAD } ^ [ stdin ]:3: 'true' got unexpected typed args false ( 42, 43 ) ^ [ stdin ]:6: 'false' got unexpected typed args |
osh | 14 Block param binding [osh status] Expected 0, got 1 stdout: stderr: package unzip { ^~~~~~~ [ stdin ]:18: fatal: No value provided for param 'b' |
osh-cpp | 14 Block param binding [osh-cpp status] Expected 0, got 2 stdout: stderr: proc package(name, b Block) { ^~~~~ [ stdin ]:3: proc param types should be Ref, Expr, or Block |
osh | 15 Proc that doesn't take a block [osh stdout] Expected 'status=1\n', got 'task name=foo\nstatus=0\n' stdout: task name=foo status=0stderr: |
osh-cpp | 15 Proc that doesn't take a block [osh-cpp stdout] Expected 'status=1\n', got 'task name=foo\nstatus=0\n' stdout: task name=foo status=0stderr: |