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