spec test index / oilshell.org
status | osh | osh-cpp | |
pass | 5 | 5 | |
ok | 1 | 1 | |
FAIL | 5 | 5 | |
total | 11 | 11 | |
case | osh | osh-cpp | description |
0 | pass | pass | trap can use original $LINENO |
1 | FAIL | FAIL | trap ERR and if statement |
details | details | ||
2 | FAIL | FAIL | trap ERR does not run in errexit situations |
details | details | ||
3 | FAIL | FAIL | trap ERR pipeline (also errexit) |
details | details | ||
4 | pass | pass | trap ERR subprogram - subshell, command sub, async |
5 | FAIL | FAIL | trap ERR not active in shell functions in (bash behavior) |
details | details | ||
6 | FAIL | FAIL | trap ERR shell function - with errtrace |
details | details | ||
7 | pass | pass | trap ERR with YSH proc |
8 | pass | pass | trap ERR |
9 | ok | ok | trap ERR and pipelines (lastpipe and PIPESTATUS difference) |
details | details | ||
10 | pass | pass | error in trap ERR (recursive) |
10 passed, 2 OK, 0 not implemented, 0 BUG, 10 failed, 0 timeouts, 0 cases skipped 5 failed under osh
osh | 1 trap ERR and if statement [osh stdout] Expected '', got 'err\n' stdout: errstderr: |
osh-cpp | 1 trap ERR and if statement [osh-cpp stdout] Expected '', got 'err\n' stdout: errstderr: |
osh | 2 trap ERR does not run in errexit situations [osh stdout] Expected 'until\nline=16\nline=20\nline=20\nline=20\nok\n' Got 'line=3\nline=7\nline=11\nuntil\nline=16\nline=16\nline=16\nline=16\nline=18\nline=20\nline=20\nline=20\nok\n' stdout: line=3 line=7 line=11 until line=16 line=16 line=16 line=16 line=18 line=20 line=20 line=20 okstderr: |
osh-cpp | 2 trap ERR does not run in errexit situations [osh-cpp stdout] Expected 'until\nline=16\nline=20\nline=20\nline=20\nok\n' Got 'line=3\nline=7\nline=11\nuntil\nline=16\nline=16\nline=16\nline=16\nline=18\nline=20\nline=20\nline=20\nok\n' stdout: line=3 line=7 line=11 until line=16 line=16 line=16 line=16 line=18 line=20 line=20 line=20 okstderr: |
osh | 3 trap ERR pipeline (also errexit) [osh stdout] Expected 'line=3\nline=5\n', got 'line=3\nline=3\nline=5\nline=5\nline=8\n' stdout: line=3 line=3 line=5 line=5 line=8stderr: |
osh-cpp | 3 trap ERR pipeline (also errexit) [osh-cpp stdout] Expected 'line=3\nline=5\n', got 'line=3\nline=3\nline=5\nline=5\nline=8\n' stdout: line=3 line=3 line=5 line=5 line=8stderr: |
osh | 5 trap ERR not active in shell functions in (bash behavior) [osh stdout] Expected '', got 'line=4\n' stdout: line=4stderr: |
osh-cpp | 5 trap ERR not active in shell functions in (bash behavior) [osh-cpp stdout] Expected '', got 'line=4\n' stdout: line=4stderr: |
osh | 6 trap ERR shell function - with errtrace [osh stdout] Expected 'line=14\nnow with errtrace\nline=4\nline=10\nline=20\nok\n' Got 'line=4\nline=10\nline=10\nline=16\nnow with errtrace\nline=4\nline=10\nline=10\nok\n' stdout: line=4 line=10 line=10 line=16 now with errtrace line=4 line=10 line=10 okstderr: set -o errtrace ^~~ [ stdin ]:16: 'set' got invalid option 'errtrace' |
osh-cpp | 6 trap ERR shell function - with errtrace [osh-cpp stdout] Expected 'line=14\nnow with errtrace\nline=4\nline=10\nline=20\nok\n' Got 'line=4\nline=10\nline=10\nline=16\nnow with errtrace\nline=4\nline=10\nline=10\nok\n' stdout: line=4 line=10 line=10 line=16 now with errtrace line=4 line=10 line=10 okstderr: set -o errtrace ^~~ [ stdin ]:16: 'set' got invalid option 'errtrace' |
osh | 9 trap ERR and pipelines (lastpipe and PIPESTATUS difference) stdout: A err [] status=1 [] B err [] status=1 [0 0] err [] status=1 [0 1] err [] status=1 [0 1 0] okstderr: |
osh-cpp | 9 trap ERR and pipelines (lastpipe and PIPESTATUS difference) stdout: A err [] status=1 [] B err [] status=1 [0 0] err [] status=1 [0 1] err [] status=1 [0 1 0] okstderr: |