180 passed, 15 OK, 5 not implemented, 9 BUG, 91 failed, 0 timeouts, 0 cases skipped 2 failed under osh
| bash | 0 traps are not active inside subshells $() () trap | cat stdout: 1 traps.txt ( ) trap -- 'echo bye' EXIT $(trap) trap -- 'echo bye' EXIT trap | cat trap -- 'echo bye' EXIT byestderr: |
| ash | 0 traps are not active inside subshells $() () trap | cat stdout: 1 traps.txt ( ) $(trap) trap -- 'echo bye' EXIT trap | cat byestderr: |
| zsh | 0 traps are not active inside subshells $() () trap | cat [zsh stdout] Expected '1 traps.txt\n( )\n$(trap)\n\ntrap | cat\nbye\n' Got "1 traps.txt\n( )\n$(trap)\n\ntrap | cat\ntrap -- 'echo bye' EXIT\nbye\n" stdout: 1 traps.txt ( ) $(trap) trap | cat trap -- 'echo bye' EXIT byestderr: |
| toysh | 0 traps are not active inside subshells $() () trap | cat [toysh stdout] Expected '1 traps.txt\n( )\n$(trap)\n\ntrap | cat\nbye\n' Got '0 traps.txt\n( )\n$(trap)\n\ntrap | cat\n' stdout: 0 traps.txt ( ) $(trap) trap | catstderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
| sush | 0 traps are not active inside subshells $() () trap | cat [sush stdout] Expected '1 traps.txt\n( )\n$(trap)\n\ntrap | cat\nbye\n' Got "1 traps.txt\n( )\ntrap -- 'echo bye' EXIT\n$(trap)\ntrap -- 'echo bye' EXIT\ntrap | cat\ntrap -- 'echo bye' EXIT\nbye\n" stdout: 1 traps.txt ( ) trap -- 'echo bye' EXIT $(trap) trap -- 'echo bye' EXIT trap | cat trap -- 'echo bye' EXIT byestderr: |
| brush | 0 traps are not active inside subshells $() () trap | cat [brush stdout] Expected '1 traps.txt\n( )\n$(trap)\n\ntrap | cat\nbye\n' Got "1 traps.txt\n( )\ntrap -- 'echo bye' EXIT\n$(trap)\ntrap -- 'echo bye' EXIT\ntrap | cat\ntrap -- 'echo bye' EXIT\n" stdout: 1 traps.txt ( ) trap -- 'echo bye' EXIT $(trap) trap -- 'echo bye' EXIT trap | cat trap -- 'echo bye' EXITstderr: |
| toysh | 1 trap accepts/ignores -- [toysh stdout] Expected 'ok\nhi\n' Got 'ok\n' stdout: okstderr: sh: trap: No such file or directory |
| sush | 1 trap accepts/ignores -- [sush stdout] Expected 'ok\nhi\n' Got 'ok\n' stdout: okstderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: trap: echo hi: invalid signal specification |
| brush | 1 trap accepts/ignores -- [brush stdout] Expected 'ok\nhi\n' Got 'ok\n' stdout: okstderr: |
| zsh | 3 trap foo gives non-zero error [zsh stdout] Expected 'ok\n' Got '' stdout: stderr: |
| mksh | 3 trap foo gives non-zero error stdout: stderr: |
| ksh | 3 trap foo gives non-zero error [ksh stdout] Expected 'ok\n' Got '' stdout: stderr: |
| dash | 4 SIGINT and INT are aliases stdout: 1 0stderr: trap: SIGINT: bad trap |
| zsh | 4 SIGINT and INT are aliases [zsh stdout] Expected '0\n0\n' Got '1\n1\n' stdout: 1 1stderr: trap: undefined signal: SIGINT trap: undefined signal: INT |
| toysh | 4 SIGINT and INT are aliases [toysh stdout] Expected '0\n0\n' Got '127\n127\n' stdout: 127 127stderr: sh: trap: No such file or directory sh: trap: No such file or directory |
| toysh | 5 trap without args prints traps [toysh stdout] Expected "status=0\ntrap -- 'echo exit' EXIT\nstatus=0\nexit\n" Got 'status=127\nstatus=127\n' stdout: status=127 status=127stderr: sh: trap: No such file or directory sh: trap: No such file or directory |
| brush | 5 trap without args prints traps [brush stdout] Expected "status=0\ntrap -- 'echo exit' EXIT\nstatus=0\nexit\n" Got "status=0\ntrap -- 'echo exit' EXIT\nstatus=0\n" stdout: status=0 trap -- 'echo exit' EXIT status=0stderr: |
| dash | 6 print trap handler with multiple lines stdout: trap -- 'echo 1 echo 2 echo 3' INTstderr: |
| ash | 6 print trap handler with multiple lines stdout: trap -- 'echo 1 echo 2 echo 3' INTstderr: |
| zsh | 6 print trap handler with multiple lines [zsh stdout] Expected "trap -- 'echo 1\necho 2\necho 3' SIGINT\n" Got '' stdout: stderr: trap: undefined signal: INT |
| mksh | 6 print trap handler with multiple lines stdout: trap -- $'echo 1\necho 2\necho 3' INTstderr: |
| ksh | 6 print trap handler with multiple lines [ksh stdout] Expected "trap -- 'echo 1\necho 2\necho 3' SIGINT\n" Got "trap -- $'echo 1\\necho 2\\necho 3' INT\n" stdout: trap -- $'echo 1\necho 2\necho 3' INTstderr: |
| toysh | 6 print trap handler with multiple lines [toysh stdout] Expected "trap -- 'echo 1\necho 2\necho 3' SIGINT\n" Got '' [toysh status] Expected 0 Got 127 stdout: stderr: sh: trap: No such file or directory sh: trap: No such file or directory |
| osh | 6 print trap handler with multiple lines [osh stdout] Expected "trap -- 'echo 1\necho 2\necho 3' SIGINT\n" Got "trap -- '<unknown>' SIGINT\n" stdout: trap -- '<unknown>' SIGINTstderr: |
| dash | 7 trap -p is like trap: it prints the handlers and full signal names stdout: stderr: |
| ash | 7 trap -p is like trap: it prints the handlers and full signal names stdout: EXITstderr: ash: trap: line 4: illegal option -p |
| zsh | 7 trap -p is like trap: it prints the handlers and full signal names [zsh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\nEXIT\n" Got 'EXIT\n' stdout: EXITstderr: trap: undefined signal: INT |
| mksh | 7 trap -p is like trap: it prints the handlers and full signal names stdout: EXITstderr: mksh: <stdin>[4]: trap: -p: unknown option |
| ksh | 7 trap -p is like trap: it prints the handlers and full signal names [ksh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\nEXIT\n" Got 'EXIT\n' [ksh status] Expected 0 Got 1 stdout: EXITstderr: E: ksh: <stdin>[4]: trap: -p: unknown option |
| toysh | 7 trap -p is like trap: it prints the handlers and full signal names [toysh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\nEXIT\n" Got '' [toysh status] Expected 0 Got -6 stdout: stderr: munmap_chunk(): invalid pointer |
| sush | 7 trap -p is like trap: it prints the handlers and full signal names [sush stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\nEXIT\n" Got 'EXIT\n' stdout: EXITstderr: trap: usage: trap arg signal_spec ... |
| brush | 7 trap -p is like trap: it prints the handlers and full signal names [brush stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\nEXIT\n" Got "trap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\n" stdout: trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXITstderr: |
| dash | 8 Register the same handler for multiple signals stdout: trap -- 'echo test' EXIT trap -- 'echo test' INT trap -- 'echo test' TERM teststderr: |
| ash | 8 Register the same handler for multiple signals stdout: trap -- 'echo test' EXIT trap -- 'echo test' INT trap -- 'echo test' TERM teststderr: |
| zsh | 8 Register the same handler for multiple signals [zsh stdout] Expected "trap -- 'echo test' EXIT\ntrap -- 'echo test' SIGINT\ntrap -- 'echo test' SIGTERM\ntest\n" Got '' stdout: stderr: trap: undefined signal: TERM |
| mksh | 8 Register the same handler for multiple signals stdout: trap -- 'echo test' EXIT trap -- 'echo test' INT trap -- 'echo test' TERM teststderr: |
| ksh | 8 Register the same handler for multiple signals [ksh stdout] Expected "trap -- 'echo test' EXIT\ntrap -- 'echo test' SIGINT\ntrap -- 'echo test' SIGTERM\ntest\n" Got "trap -- 'echo test' EXIT\ntrap -- 'echo test' INT\ntrap -- 'echo test' TERM\ntest\n" stdout: trap -- 'echo test' EXIT trap -- 'echo test' INT trap -- 'echo test' TERM teststderr: |
| toysh | 8 Register the same handler for multiple signals [toysh stdout] Expected "trap -- 'echo test' EXIT\ntrap -- 'echo test' SIGINT\ntrap -- 'echo test' SIGTERM\ntest\n" Got '' [toysh status] Expected 0 Got 127 stdout: stderr: sh: trap: No such file or directory sh: trap: No such file or directory |
| sush | 8 Register the same handler for multiple signals [sush stdout] Expected "trap -- 'echo test' EXIT\ntrap -- 'echo test' SIGINT\ntrap -- 'echo test' SIGTERM\ntest\n" Got "trap -- 'echo test' SIGTERM\ntrap -- 'echo test' SIGINT\ntrap -- 'echo test' EXIT\ntest\n" stdout: trap -- 'echo test' SIGTERM trap -- 'echo test' SIGINT trap -- 'echo test' EXIT teststderr: |
| brush | 8 Register the same handler for multiple signals [brush stdout] Expected "trap -- 'echo test' EXIT\ntrap -- 'echo test' SIGINT\ntrap -- 'echo test' SIGTERM\ntest\n" Got "trap -- 'echo test' SIGINT\ntrap -- 'echo test' SIGTERM\ntrap -- 'echo test' EXIT\n" stdout: trap -- 'echo test' SIGINT trap -- 'echo test' SIGTERM trap -- 'echo test' EXITstderr: |
| zsh | 9 Remove multiple handlers with trap - [zsh stdout] Expected '---\nok\n' Got "trap -- 'echo e' EXIT\n---\nok\ne\n" stdout: trap -- 'echo e' EXIT --- ok estderr: trap: undefined signal: INT trap: undefined signal: int trap: undefined signal: INT trap: undefined signal: int |
| sush | 9 Remove multiple handlers with trap - [sush stdout] Expected '---\nok\n' Got "trap -- 'echo int' SIGINT\ntrap -- 'echo e' EXIT\n---\nok\ne\n" stdout: trap -- 'echo int' SIGINT trap -- 'echo e' EXIT --- ok estderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: trap: int: invalid signal specification /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: trap: int: invalid signal specification |
| brush | 9 Remove multiple handlers with trap - [brush stdout] Expected '---\nok\n' Got "trap -- 'echo e' EXIT\n---\nok\n" stdout: trap -- 'echo e' EXIT --- okstderr: error: unexpected argument '-9' found tip: to pass '-9' as a value, use '-- -9' Usage: trap [OPTIONS] [ARGS]... For more information, try '--help'. |
| dash | 10 trap EXIT clears the EXIT trap stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo INT' INT ---stderr: |
| ash | 10 trap EXIT clears the EXIT trap stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo INT' INT ---stderr: |
| zsh | 10 trap EXIT clears the EXIT trap [zsh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n---\n" Got "trap -- 'echo EXIT' EXIT\n---\n---\n" stdout: trap -- 'echo EXIT' EXIT --- ---stderr: trap: undefined signal: INT |
| mksh | 10 trap EXIT clears the EXIT trap stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT EXITstderr: |
| ksh | 10 trap EXIT clears the EXIT trap [ksh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n---\n" Got "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' INT\n---\ntrap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' INT\n---\ntrap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' INT\nEXIT\n" stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT EXITstderr: |
| toysh | 10 trap EXIT clears the EXIT trap [toysh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n---\n" Got '---\n---\n' [toysh status] Expected 0 Got 127 stdout: --- ---stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
| sush | 10 trap EXIT clears the EXIT trap [sush stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n---\n" Got "trap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\n---\ntrap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\n---\ntrap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\nEXIT\n" stdout: trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXIT --- trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXIT --- trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXIT EXITstderr: trap: usage: trap arg signal_spec ... trap: usage: trap arg signal_spec ... |
| dash | 11 trap 0 is equivalent to trap EXIT stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo INT' INTstderr: |
| ash | 11 trap 0 is equivalent to trap EXIT stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo INT' INTstderr: |
| zsh | 11 trap 0 is equivalent to trap EXIT [zsh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n" Got "trap -- 'echo EXIT' EXIT\n---\n" stdout: trap -- 'echo EXIT' EXIT ---stderr: trap: undefined signal: INT |
| mksh | 11 trap 0 is equivalent to trap EXIT stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo INT' INTstderr: |
| ksh | 11 trap 0 is equivalent to trap EXIT [ksh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n" Got "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' INT\n---\ntrap -- 'echo INT' INT\n" stdout: trap -- 'echo EXIT' EXIT trap -- 'echo INT' INT --- trap -- 'echo INT' INTstderr: |
| toysh | 11 trap 0 is equivalent to trap EXIT [toysh stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n" Got '---\n' [toysh status] Expected 0 Got 127 stdout: ---stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
| sush | 11 trap 0 is equivalent to trap EXIT [sush stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n" Got "trap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\n---\ntrap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\nEXIT\n" stdout: trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXIT --- trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXIT EXITstderr: trap: usage: trap arg signal_spec ... |
| brush | 11 trap 0 is equivalent to trap EXIT [brush stdout] Expected "trap -- 'echo EXIT' EXIT\ntrap -- 'echo INT' SIGINT\n---\ntrap -- 'echo INT' SIGINT\n" Got "trap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\n---\ntrap -- 'echo INT' SIGINT\n" stdout: trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXIT --- trap -- 'echo INT' SIGINTstderr: |
| dash | 12 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP stdout: status=1 status=0 status=0 status=0stderr: trap: SIGHUP: bad trap |
| zsh | 12 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP [zsh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n' Got 'status=1\nstatus=1\nstatus=0\nstatus=1\n' stdout: status=1 status=1 status=0 status=1stderr: trap: undefined signal: SIGHUP trap: undefined signal: HUP trap: undefined signal: HUP |
| toysh | 12 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP [toysh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n' Got 'status=127\nstatus=127\nstatus=127\nstatus=127\n' stdout: status=127 status=127 status=127 status=127stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
| toysh | 13 trap 0 2 resets EXIT AND SIGINT [toysh stdout] Expected "---\ntrap -- 'echo EXIT' EXIT\n---\n---\n" Got '---\n---\n---\n' [toysh status] Expected 0 Got 127 stdout: --- --- ---stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
| sush | 13 trap 0 2 resets EXIT AND SIGINT [sush stdout] Expected "---\ntrap -- 'echo EXIT' EXIT\n---\n---\n" Got "---\ntrap -- 'echo EXIT' EXIT\n---\ntrap -- 'echo EXIT' EXIT\ntrap -- '0' SIGINT\n---\ntrap -- 'echo EXIT' EXIT\ntrap -- '0' SIGINT\ntrap -- 'echo INT' SIGINT\ntrap -- 'echo EXIT' EXIT\ntrap -- '2' EXIT\n" [sush status] Expected 0 Got 127 stdout: --- trap -- 'echo EXIT' EXIT --- trap -- 'echo EXIT' EXIT trap -- '0' SIGINT --- trap -- 'echo EXIT' EXIT trap -- '0' SIGINT trap -- 'echo INT' SIGINT trap -- 'echo EXIT' EXIT trap -- '2' EXITstderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 2: command not found |
| brush | 13 trap 0 2 resets EXIT AND SIGINT [brush stdout] Expected "---\ntrap -- 'echo EXIT' EXIT\n---\n---\n" Got "---\ntrap -- 'echo EXIT' EXIT\n---\ntrap -- 'echo EXIT' EXIT\ntrap -- '0' SIGINT\n---\ntrap -- '2' EXIT\ntrap -- 'echo INT' SIGINT\n" stdout: --- trap -- 'echo EXIT' EXIT --- trap -- 'echo EXIT' EXIT trap -- '0' SIGINT --- trap -- '2' EXIT trap -- 'echo INT' SIGINTstderr: |
| zsh | 14 trap '' EXIT - printing state [zsh stdout] Expected "trap -- 'echo exit' EXIT\n\ntrap -- '' EXIT\n\ntrap -- '# comment' EXIT\n" Got "trap -- 'echo exit' EXIT\n\ntrap -- '' EXIT\n\ntrap -- '' EXIT\n" stdout: trap -- 'echo exit' EXIT trap -- '' EXIT trap -- '' EXITstderr: |
| mksh | 14 trap '' EXIT - printing state stdout: trap -- 'echo exit' EXIT trap -- EXIT trap -- '# comment' EXITstderr: |
| toysh | 14 trap '' EXIT - printing state [toysh stdout] Expected "trap -- 'echo exit' EXIT\n\ntrap -- '' EXIT\n\ntrap -- '# comment' EXIT\n" Got '\n\n' [toysh status] Expected 0 Got 127 stdout: stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
| sush | 14 trap '' EXIT - printing state [sush stdout] Expected "trap -- 'echo exit' EXIT\n\ntrap -- '' EXIT\n\ntrap -- '# comment' EXIT\n" Got "trap -- 'echo exit' EXIT\n\ntrap -- 'echo exit' EXIT\ntrap -- '' EXIT\n\ntrap -- 'echo exit' EXIT\ntrap -- '' EXIT\ntrap -- '# comment' EXIT\n" stdout: trap -- 'echo exit' EXIT trap -- 'echo exit' EXIT trap -- '' EXIT trap -- 'echo exit' EXIT trap -- '' EXIT trap -- '# comment' EXITstderr: |
| osh | 14 trap '' EXIT - printing state [osh stdout] Expected "trap -- 'echo exit' EXIT\n\ntrap -- '' EXIT\n\ntrap -- '# comment' EXIT\n" Got "trap -- 'echo exit' EXIT\n\ntrap -- '<unknown>' EXIT\n\ntrap -- '<unknown>' EXIT\n" stdout: trap -- 'echo exit' EXIT trap -- '<unknown>' EXIT trap -- '<unknown>' EXITstderr: |
| zsh | 15 trap 'echo hi' KILL (regression test, caught by smoosh suite) [zsh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n' Got 'status=0\nstatus=1\nstatus=0\nstatus=1\n' stdout: status=0 status=1 status=0 status=1stderr: trap: undefined signal: KILL trap: undefined signal: TERM |
| toysh | 15 trap 'echo hi' KILL (regression test, caught by smoosh suite) [toysh stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n' Got 'status=127\nstatus=127\nstatus=127\nstatus=127\n' stdout: status=127 status=127 status=127 status=127stderr: sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory sh: trap: No such file or directory |
| sush | 15 trap 'echo hi' KILL (regression test, caught by smoosh suite) [sush stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n' Got 'status=1\n' [sush status] Expected 0 Got -6 stdout: status=1stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: trap: 9: forbidden signal for trap thread 'main' panicked at src/signal.rs:16:56: sush(fatal): cannot ignore signal: EINVAL note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
| osh | 15 trap 'echo hi' KILL (regression test, caught by smoosh suite) stdout: status=2 status=2 status=2 status=0stderr: trap 'echo hi' 9
^
[ stdin ]:1: Signal '9' can't be handled
trap 'echo hi' KILL
^~~~
[ stdin ]:4: Signal 'KILL' can't be handled
trap 'echo hi' STOP
^~~~
[ stdin ]:7: Signal 'STOP' can't be handled
|
| bash | 16 exit 1 when trap code string is invalid stdout: status=0stderr: bash: exit trap: line 1: syntax error near unexpected token `newline' bash: exit trap: line 1: `echo <' |
| dash | 16 exit 1 when trap code string is invalid stdout: status=0stderr: dash: 1: Syntax error: end of file unexpected |
| ash | 16 exit 1 when trap code string is invalid stdout: status=0stderr: ash: syntax error: unexpected end of file |
| mksh | 16 exit 1 when trap code string is invalid stdout: status=0stderr: mksh: syntax error: unexpected EOF |
| ksh | 16 exit 1 when trap code string is invalid [ksh stdout] Expected 'status=1\n' Got 'status=0\n' [ksh status] Expected 0 Got 1 stdout: status=0stderr: E: ksh: syntax error: unexpected EOF |
| toysh | 16 exit 1 when trap code string is invalid [toysh stdout] Expected 'status=1\n' Got 'status=127\n' stdout: status=127stderr: sh: trap: No such file or directory |
| sush | 16 exit 1 when trap code string is invalid [sush stdout] Expected 'status=1\n' Got 'status=0\n' [sush status] Expected 0 Got 2 stdout: status=0stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: syntax error near unexpected token: < |
| brush | 16 exit 1 when trap code string is invalid [brush stdout] Expected 'status=1\n' Got 'status=0\n' stdout: status=0stderr: |
| zsh | 17 trap EXIT calling exit [zsh status] Expected 42 Got 0 stdout: cleanup [x y z]stderr: |
| toysh | 17 trap EXIT calling exit [toysh stdout] Expected 'cleanup [x y z]\n' Got '' [toysh status] Expected 42 Got 127 stdout: stderr: sh: trap: No such file or directory |
| brush | 17 trap EXIT calling exit [brush stdout] Expected 'cleanup [x y z]\n' Got '' [brush status] Expected 42 Got 0 stdout: stderr: |
| toysh | 18 trap EXIT return status ignored [toysh stdout] Expected 'cleanup [x y z]\n' Got '' [toysh status] Expected 0 Got 127 stdout: stderr: sh: trap: No such file or directory |
| sush | 18 trap EXIT return status ignored [sush status] Expected 0 Got 42 stdout: cleanup [x y z]stderr: |
| brush | 18 trap EXIT return status ignored [brush stdout] Expected 'cleanup [x y z]\n' Got '' stdout: stderr: |
| zsh | 19 trap EXIT with PARSE error [zsh status] Expected 2 Got 1 stdout: FAILEDstderr: zsh: parse error near `\n' |
| mksh | 19 trap EXIT with PARSE error stdout: FAILEDstderr: mksh: <stdin>[2]: syntax error: 'newline' unexpected |
| ksh | 19 trap EXIT with PARSE error [ksh status] Expected 2 Got 1 stdout: FAILEDstderr: E: ksh: <stdin>[2]: syntax error: unexpected 'newline' |
| toysh | 19 trap EXIT with PARSE error [toysh stdout] Expected 'FAILED\n' Got '' stdout: stderr: sh: trap: No such file or directory main: line 2: sh: syntax error: newline |
| sush | 19 trap EXIT with PARSE error [sush status] Expected 2 Got 0 stdout: FAILEDstderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: syntax error near unexpected token: |
| brush | 19 trap EXIT with PARSE error [brush stdout] Expected 'FAILED\n' Got '' stdout: stderr: [31merror:[39m main: syntax error near token ` ' (line 1 col 4) |
| zsh | 20 trap EXIT with PARSE error and explicit exit [zsh status] Expected 0 Got 1 stdout: FAILEDstderr: zsh: parse error near `\n' |
| toysh | 20 trap EXIT with PARSE error and explicit exit [toysh stdout] Expected 'FAILED\n' Got '' [toysh status] Expected 0 Got 2 stdout: stderr: sh: trap: No such file or directory main: line 2: sh: syntax error: newline |
| brush | 20 trap EXIT with PARSE error and explicit exit [brush stdout] Expected 'FAILED\n' Got '' [brush status] Expected 0 Got 2 stdout: stderr: [31merror:[39m main: syntax error near token ` ' (line 1 col 4) |
| toysh | 21 trap EXIT with explicit exit [toysh stdout] Expected 'IN TRAP\nFOO\n' Got '' stdout: stderr: sh: trap: No such file or directory |
| sush | 21 trap EXIT with explicit exit [sush status] Expected 42 Got 0 stdout: IN TRAP FOOstderr: |
| brush | 21 trap EXIT with explicit exit [brush stdout] Expected 'IN TRAP\nFOO\n' Got '' stdout: stderr: |
| toysh | 22 trap EXIT with command sub / subshell / pipeline [toysh stdout] Expected 'command sub\nsubshell\npipeline\nEXIT TRAP\n' Got 'command sub\nsubshell\npipeline\n' stdout: command sub subshell pipelinestderr: sh: trap: No such file or directory |
| brush | 22 trap EXIT with command sub / subshell / pipeline [brush stdout] Expected 'command sub\nsubshell\npipeline\nEXIT TRAP\n' Got 'command sub\nsubshell\npipeline\n' stdout: command sub subshell pipelinestderr: |
| toysh | 23 eval in the exit trap (regression for issue #293) [toysh stdout] Expected 'hi\n' Got '' [toysh status] Expected 0 Got 127 stdout: stderr: sh: trap: No such file or directory |
| brush | 23 eval in the exit trap (regression for issue #293) [brush stdout] Expected 'hi\n' Got '' stdout: stderr: |
| toysh | 24 exit codes for traps are isolated [toysh stdout] Expected 'before=0\nUSR1 trap status=0\nafter=0\n' Got 'before=127\n' [toysh status] Expected 0 Got -10 stdout: before=127stderr: sh: trap: No such file or directory |
| sush | 24 exit codes for traps are isolated [sush stdout] Expected 'before=0\nUSR1 trap status=0\nafter=0\n' Got 'before=0\nafter=0\n' stdout: before=0 after=0stderr: |
| brush | 24 exit codes for traps are isolated [brush stdout] Expected 'before=0\nUSR1 trap status=0\nafter=0\n' Got 'before=0\n' [brush status] Expected 0 Got -10 stdout: before=0stderr: |
| toysh | 25 traps are cleared in subshell (started with &) [toysh stdout] Expected 'SIGURG\nbegin child\nend child\nwait status 0\n' Got 'begin child\nend child\nwait status 0\n' stdout: begin child end child wait status 0stderr: sh: trap: No such file or directory kill: missing argument (see "kill --help") |
| sush | 25 traps are cleared in subshell (started with &) [sush stdout] Expected 'SIGURG\nbegin child\nend child\nwait status 0\n' Got 'begin child\nend child\nSIGURG\nwait status 0\n' stdout: begin child end child SIGURG wait status 0stderr: 714750 |
| brush | 25 traps are cleared in subshell (started with &) [brush stdout] Expected 'SIGURG\nbegin child\nend child\nwait status 0\n' Got 'begin child\nend child\nwait status 0\n' stdout: begin child end child wait status 0stderr: kill: invalid usage |
| toysh | 26 trap USR1, sleep, SIGINT: non-interactively [toysh stdout] Expected 'usr1\nstatus=0\n' Got 'status=0\n' stdout: status=0stderr: sh: command: No such file or directory sh: trap: No such file or directory sh: -USR1: No such file or directory |
| brush | 26 trap USR1, sleep, SIGINT: non-interactively [brush stdout] Expected 'usr1\nstatus=0\n' Got 'status=0\n' stdout: status=0stderr: |
| mksh | 27 trap INT, sleep, SIGINT: non-interactively stdout: mkshstderr: |
| toysh | 27 trap INT, sleep, SIGINT: non-interactively [toysh stdout] Expected 'status=0\n' Got '' [toysh status] Expected 0 Got -6 stdout: stderr: munmap_chunk(): invalid pointer |
| osh | 27 trap INT, sleep, SIGINT: non-interactively stdout: int status=0stderr: |
| toysh | 28 trap EXIT, sleep, SIGINT: non-interactively [toysh stdout] Expected 'on exit\nstatus=0\n' Got 'status=0\n' stdout: status=0stderr: sh: command: No such file or directory sh: trap: No such file or directory sh: -INT: No such file or directory |
| brush | 28 trap EXIT, sleep, SIGINT: non-interactively [brush stdout] Expected 'on exit\nstatus=0\n' Got 'status=0\n' stdout: status=0stderr: |
| zsh | 29 Remove trap with an unsigned integer [zsh stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got 'ok0\n\nok42space\n\nok07\n\nbad\nfailure\n' stdout: ok0 ok42space ok07 bad failurestderr: zsh:1: command not found: 42 zsh:1: command not found: -1 |
| toysh | 29 Remove trap with an unsigned integer [toysh stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got '\n\n\nfailure\n' stdout: failurestderr: sh: Unknown option 'e' (see "sh --help") sh: Unknown option 'e' (see "sh --help") sh: Unknown option 'e' (see "sh --help") sh: Unknown option 'e' (see "sh --help") |
| sush | 29 Remove trap with an unsigned integer [sush stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got 'ok0\n\nok42space\n\nok07\n\nbad\nfailure\n' stdout: ok0 ok42space ok07 bad failurestderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 0: command not found /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 42: command not found /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: 07: command not found /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: -1: command not found |
| brush | 29 Remove trap with an unsigned integer [brush stdout] Expected 'ok0\n\nok42space\n\nok07\n\ntrap-exit\nfailure\n' Got '\n\n\nfailure\n' stdout: failurestderr: error: unexpected argument '-e' found tip: to pass '-e' as a value, use '-- -e' Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...] For more information, try '--help'. error: unexpected argument '-e' found tip: to pass '-e' as a value, use '-- -e' Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...] For more information, try '--help'. error: unexpected argument '-e' found tip: to pass '-e' as a value, use '-- -e' Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...] For more information, try '--help'. error: unexpected argument '-e' found tip: to pass '-e' as a value, use '-- -e' Usage: brush [OPTIONS]... [SCRIPT_PATH [SCRIPT_ARGS]...] For more information, try '--help'. |