spec test index / oilshell.org
82 passed, 4 OK, 15 not implemented, 4 BUG, 5 failed, 0 timeouts, 0 cases skipped 5 failed under osh
dash | 0 trap -l stdout: stderr: dash: 1: trap: Illegal option -l |
mksh | 0 trap -l stdout: stderr: mksh: <stdin>[1]: trap: -l: unknown option |
osh | 2 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: Signal 'KILL' can't be handled trap 'echo hi' STOP ^~~~ [ stdin ]:5: Signal 'STOP' can't be handled |
osh_ALT | 2 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: Signal 'KILL' can't be handled trap 'echo hi' STOP ^~~~ [ stdin ]:5: Signal 'STOP' can't be handled |
dash | 3 trap -p stdout: exitstderr: dash: 2: trap: Illegal option -p |
mksh | 3 trap -p stdout: exitstderr: mksh: <stdin>[2]: trap: -p: unknown option |
dash | 6 SIGINT and INT are aliases stdout: 1 0stderr: trap: SIGINT: bad trap |
dash | 7 Invalid trap invocation stdout: status=1stderr: trap: foo: bad trap |
mksh | 7 Invalid trap invocation stdout: status=0stderr: |
dash | 8 exit 1 when trap code string is invalid stdout: status=0stderr: dash: 1: Syntax error: end of file unexpected |
bash | 8 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 <' |
mksh | 8 exit 1 when trap code string is invalid stdout: status=0stderr: mksh: syntax error: unexpected EOF |
mksh | 11 trap EXIT with PARSE error stdout: FAILEDstderr: mksh: <stdin>[2]: syntax error: 'newline' unexpected |
dash | 14 trap DEBUG stdout: 1 2stderr: trap: DEBUG: bad trap |
mksh | 14 trap DEBUG stdout: 1 2stderr: mksh: <stdin>[4]: trap: bad signal 'DEBUG' |
osh | 14 trap DEBUG [osh stdout] Expected 'debuglog [x y]\n1\ndebuglog [x y]\n2\n', got '1\n2\n' stdout: 1 2stderr: osh warning: The 'DEBUG' hook isn't implemented |
osh_ALT | 14 trap DEBUG [osh_ALT stdout] Expected 'debuglog [x y]\n1\ndebuglog [x y]\n2\n', got '1\n2\n' stdout: 1 2stderr: osh warning: The 'DEBUG' hook isn't implemented |
dash | 15 trap DEBUG and pipeline stdout: stderr: |
mksh | 15 trap DEBUG and pipeline stdout: stderr: |
osh | 15 trap DEBUG and pipeline [osh stdout] Expected ' [6]\na\n [6]\nb\n [7]\n2\n [8]\n [8]\n1\n [9]\n [10]\n1\n', got 'a\nb\n2\n1\n1\n' stdout: a b 2 1 1stderr: osh warning: The 'DEBUG' hook isn't implemented |
osh_ALT | 15 trap DEBUG and pipeline [osh_ALT stdout] Expected ' [6]\na\n [6]\nb\n [7]\n2\n [8]\n [8]\n1\n [9]\n [10]\n1\n', got 'a\nb\n2\n1\n1\n' stdout: a b 2 1 1stderr: osh warning: The 'DEBUG' hook isn't implemented |
dash | 16 trap DEBUG with compound commands stdout: stderr: |
mksh | 16 trap DEBUG with compound commands stdout: stderr: |
osh | 16 trap DEBUG with compound commands [osh stdout] Expected ' [12]\n-- assign --\n [13]\n [14]\n-- function call --\n [15]\n [16]\n-- for --\n [17]\n [18]\nfor1 1\n [19]\nfor2 1\n [17]\n [18]\nfor1 2\n [19]\nfor2 2\n [21]\n-- while --\n [22]\n [23]\n [24]\nwhile1\n [25]\nwhile2\n [26]\n [23]\n [24]\nwhile1\n [25]\nwhile2\n [26]\n [23]\n [28]\n-- if --\n [29]\n [30]\nIF\n [32]\n-- case --\n [33]\n [35]\nCASE\n', got '-- assign --\n-- function call --\n-- for --\nfor1 1\nfor2 1\nfor1 2\nfor2 2\n-- while --\nwhile1\nwhile2\nwhile1\nwhile2\n-- if --\nIF\n-- case --\nCASE\n' stdout: -- assign -- -- function call -- -- for -- for1 1 for2 1 for1 2 for2 2 -- while -- while1 while2 while1 while2 -- if -- IF -- case -- CASEstderr: osh warning: The 'DEBUG' hook isn't implemented |
osh_ALT | 16 trap DEBUG with compound commands [osh_ALT stdout] Expected ' [12]\n-- assign --\n [13]\n [14]\n-- function call --\n [15]\n [16]\n-- for --\n [17]\n [18]\nfor1 1\n [19]\nfor2 1\n [17]\n [18]\nfor1 2\n [19]\nfor2 2\n [21]\n-- while --\n [22]\n [23]\n [24]\nwhile1\n [25]\nwhile2\n [26]\n [23]\n [24]\nwhile1\n [25]\nwhile2\n [26]\n [23]\n [28]\n-- if --\n [29]\n [30]\nIF\n [32]\n-- case --\n [33]\n [35]\nCASE\n', got '-- assign --\n-- function call --\n-- for --\nfor1 1\nfor2 1\nfor1 2\nfor2 2\n-- while --\nwhile1\nwhile2\nwhile1\nwhile2\n-- if --\nIF\n-- case --\nCASE\n' stdout: -- assign -- -- function call -- -- for -- for1 1 for2 1 for1 2 for2 2 -- while -- while1 while2 while1 while2 -- if -- IF -- case -- CASEstderr: osh warning: The 'DEBUG' hook isn't implemented |
dash | 17 trap RETURN stdout: -- f -- -- g -- return-helper.shstderr: trap: RETURN: bad trap |
mksh | 17 trap RETURN stdout: -- f -- -- g -- return-helper.shstderr: mksh: <stdin>[16]: trap: bad signal 'RETURN' |
osh | 17 trap RETURN [osh stdout] Expected '--\nf\n--\n--\ng\n--\nreturn-helper.sh\nprofile [x y]\n', got '--\nf\n--\n--\ng\n--\nreturn-helper.sh\n' stdout: -- f -- -- g -- return-helper.shstderr: osh warning: The 'RETURN' hook isn't implemented |
osh_ALT | 17 trap RETURN [osh_ALT stdout] Expected '--\nf\n--\n--\ng\n--\nreturn-helper.sh\nprofile [x y]\n', got '--\nf\n--\n--\ng\n--\nreturn-helper.sh\n' stdout: -- f -- -- g -- return-helper.shstderr: osh warning: The 'RETURN' hook isn't implemented |
dash | 18 trap ERR and disable it stdout: 1 2 3stderr: trap: ERR: bad trap trap: ERR: bad trap |
osh | 18 trap ERR and disable it [osh stdout] Expected '1\nerr [x y] 1\n2\n3\n', got '1\n2\n3\n' stdout: 1 2 3stderr: osh warning: The 'ERR' hook isn't implemented |
osh_ALT | 18 trap ERR and disable it [osh_ALT stdout] Expected '1\nerr [x y] 1\n2\n3\n', got '1\n2\n3\n' stdout: 1 2 3stderr: osh warning: The 'ERR' hook isn't implemented |
dash | 20 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP stdout: status=1 status=0 status=0 status=0stderr: trap: SIGHUP: bad trap |