Results for builtin-trap.test.sh

casedashbashmkshoshosh_ALTosh-byterundescription
0N-I pass N-I pass pass FAIL trap -l
detailsdetailsdetails
1N-I pass N-I pass pass FAIL trap -p
detailsdetailsdetails
2pass pass pass pass pass pass Register invalid trap
3pass pass pass pass pass pass Remove invalid trap
4N-I pass pass pass pass FAIL SIGINT and INT are aliases
detailsdetails
5ok pass BUG pass pass FAIL Invalid trap invocation
detailsdetailsdetails
6BUG BUG BUG pass pass FAIL exit 1 when trap code string is invalid
detailsdetailsdetailsdetails
7pass pass pass pass pass FAIL trap EXIT
details
8N-I pass N-I FAIL FAIL FAIL trap DEBUG
detailsdetailsdetailsdetailsdetails
9N-I pass N-I FAIL FAIL FAIL trap RETURN
detailsdetailsdetailsdetailsdetails
10N-I pass pass FAIL FAIL FAIL trap ERR and disable it
detailsdetailsdetailsdetails
11pass pass ok pass pass FAIL trap with PARSE error (implicit exit)
detailsdetails
12pass pass pass pass pass FAIL trap with PARSE error with explicit exit
details
13pass pass pass pass pass FAIL trap 0 is equivalent to EXIT
details
14N-I pass pass pass pass FAIL trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP
detailsdetails

54 passed, 2 ok, 11 known unimplemented, 4 known bugs, 3 failed, 0 skipped

Details on runs that didn't PASS

dash0 trap -l

stdout:
stderr: 
_tmp/spec-bin/dash: 1: trap: Illegal option -l
mksh0 trap -l

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: trap: -l: unknown option
osh-byterun0 trap -l

[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash1 trap -p

stdout:
exit
stderr:
_tmp/spec-bin/dash: 2: trap: Illegal option -p
mksh1 trap -p

stdout:
exit
stderr:
_tmp/spec-bin/mksh: <stdin>[2]: trap: -p: unknown option
osh-byterun1 trap -p

[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash4 SIGINT and INT are aliases

stdout:
1
0
stderr:
trap: SIGINT: bad trap
osh-byterun4 SIGINT and INT are aliases

[osh-byterun stdout] Expected '0\n0\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash5 Invalid trap invocation

stdout:
status=1
stderr:
trap: foo: bad trap
mksh5 Invalid trap invocation

stdout:
status=0
stderr:
osh-byterun5 Invalid trap invocation

[osh-byterun stdout] Expected 'status=2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash6 exit 1 when trap code string is invalid

stdout:
status=0
stderr:
_tmp/spec-bin/dash: 1: Syntax error: end of file unexpected
bash6 exit 1 when trap code string is invalid

stdout:
status=0
stderr:
_tmp/spec-bin/bash: exit trap: line 1: syntax error near unexpected token `newline'
_tmp/spec-bin/bash: exit trap: line 1: `echo <'
mksh6 exit 1 when trap code string is invalid

stdout:
status=0
stderr:
_tmp/spec-bin/mksh: syntax error: unexpected EOF
osh-byterun6 exit 1 when trap code string is invalid

[osh-byterun stdout] Expected 'status=1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun7 trap EXIT

[osh-byterun stdout] Expected 'cleanup [x y z]\n', got ''
[osh-byterun status] Expected 42, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash8 trap DEBUG

stdout:
1
2
stderr:
trap: DEBUG: bad trap
mksh8 trap DEBUG

stdout:
1
2
stderr:
_tmp/spec-bin/mksh: <stdin>[4]: trap: bad signal 'DEBUG'
osh8 trap DEBUG

[osh stdout] Expected 'debuglog [x y]\n1\ndebuglog [x y]\n2\n', got '1\n2\n'

stdout:
1
2
stderr:
osh warning: *** The 'DEBUG' isn't yet implemented in OSH ***
osh_ALT8 trap DEBUG

[osh_ALT stdout] Expected 'debuglog [x y]\n1\ndebuglog [x y]\n2\n', got '1\n2\n'

stdout:
1
2
stderr:
osh warning: *** The 'DEBUG' isn't yet implemented in OSH ***
osh-byterun8 trap DEBUG

[osh-byterun stdout] Expected 'debuglog [x y]\n1\ndebuglog [x y]\n2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash9 trap RETURN

stdout:
--
f
--
--
g
--
return-helper.sh
stderr:
trap: RETURN: bad trap
mksh9 trap RETURN

stdout:
--
f
--
--
g
--
return-helper.sh
stderr:
_tmp/spec-bin/mksh: <stdin>[16]: trap: bad signal 'RETURN'
osh9 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.sh
stderr:
osh warning: *** The 'RETURN' isn't yet implemented in OSH ***
osh_ALT9 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.sh
stderr:
osh warning: *** The 'RETURN' isn't yet implemented in OSH ***
osh-byterun9 trap RETURN

[osh-byterun stdout] Expected '--\nf\n--\n--\ng\n--\nreturn-helper.sh\nprofile [x y]\n', got ''
[osh-byterun status] Expected 42, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash10 trap ERR and disable it

stdout:
1
2
3
stderr:
trap: ERR: bad trap
trap: ERR: bad trap
osh10 trap ERR and disable it

[osh stdout] Expected '1\nerr [x y] 1\n2\n3\n', got '1\n2\n3\n'

stdout:
1
2
3
stderr:
osh warning: *** The 'ERR' isn't yet implemented in OSH ***
osh_ALT10 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
3
stderr:
osh warning: *** The 'ERR' isn't yet implemented in OSH ***
osh-byterun10 trap ERR and disable it

[osh-byterun stdout] Expected '1\nerr [x y] 1\n2\n3\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
mksh11 trap with PARSE error (implicit exit)

stdout:
FAILED
stderr:
_tmp/spec-bin/mksh: <stdin>[2]: syntax error: 'newline' unexpected
osh-byterun11 trap with PARSE error (implicit exit)

[osh-byterun stdout] Expected 'FAILED\n', got ''
[osh-byterun status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun12 trap with PARSE error with explicit exit

[osh-byterun stdout] Expected 'FAILED\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun13 trap 0 is equivalent to EXIT

[osh-byterun stdout] Expected 'status=0\nstatus=0\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash14 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP

stdout:
status=1
status=0
status=0
status=0
stderr:
trap: SIGHUP: bad trap
osh-byterun14 trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP

[osh-byterun stdout] Expected 'status=0\nstatus=0\nstatus=0\nstatus=0\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend