spec test index / oilshell.org
| status | osh | osh-cpp | |
| pass | 17 | 17 | |
| ok | 1 | 1 | |
| total | 18 | 18 | |
| case | osh | osh-cpp | description | 
| 0 | pass | pass | trap accepts/ignores -- | 
| 1 | ok | ok | trap 'echo hi' KILL (regression test, caught by smoosh suite) | 
| details | details | ||
| 2 | pass | pass | Register invalid trap | 
| 3 | pass | pass | Remove invalid trap | 
| 4 | pass | pass | SIGINT and INT are aliases | 
| 5 | pass | pass | Invalid trap invocation | 
| 6 | pass | pass | exit 1 when trap code string is invalid | 
| 7 | pass | pass | trap EXIT calling exit | 
| 8 | pass | pass | trap EXIT return status ignored | 
| 9 | pass | pass | trap EXIT with PARSE error | 
| 10 | pass | pass | trap EXIT with PARSE error and explicit exit | 
| 11 | pass | pass | trap EXIT with explicit exit | 
| 12 | pass | pass | trap EXIT with command sub / subshell / pipeline | 
| 13 | pass | pass | trap 0 is equivalent to EXIT | 
| 14 | pass | pass | trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP | 
| 15 | pass | pass | eval in the exit trap (regression for issue #293) | 
| 16 | pass | pass | exit codes for traps are isolated | 
| 17 | pass | pass | traps are cleared in subshell (started with &) | 
34 passed, 2 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped
| osh | 1 trap 'echo hi' KILL (regression test, caught by smoosh suite) stdout: status=1 status=1 status=1 status=0stderr:   trap 'echo hi' 9
                 ^
[ stdin ]:1: Signal '9' can't be handled
  trap 'echo hi' KILL
                 ^~~~
[ stdin ]:3: Invalid signal or hook 'KILL'
  trap 'echo hi' STOP
                 ^~~~
[ stdin ]:5: Signal 'STOP' can't be handled
 | 
| osh-cpp | 1 trap 'echo hi' KILL (regression test, caught by smoosh suite) stdout: status=1 status=1 status=1 status=0stderr:   trap 'echo hi' 9
                 ^
[ stdin ]:1: Signal '9' can't be handled
  trap 'echo hi' KILL
                 ^~~~
[ stdin ]:3: Invalid signal or hook 'KILL'
  trap 'echo hi' STOP
                 ^~~~
[ stdin ]:5: Signal 'STOP' can't be handled
 |