Results for builtin-trap.test.sh

casedashbashmkshoshosh_ALTdescription
0N-I pass N-I pass pass trap -l
detailsdetails
1N-I pass N-I pass pass trap -p
detailsdetails
2pass pass pass pass pass Register invalid trap
3pass pass pass pass pass Remove invalid trap
4N-I pass pass pass pass SIGINT and INT are aliases
details
5ok pass BUG pass pass Invalid trap invocation
detailsdetails
6BUG BUG BUG pass pass exit 1 when trap code string is invalid
detailsdetailsdetails
7pass pass pass pass pass trap EXIT calling exit
8pass pass pass pass pass trap EXIT return status ignored
9pass pass ok pass pass trap EXIT with PARSE error
details
10pass pass pass pass pass trap EXIT with PARSE error and explicit exit
11N-I pass N-I FAIL FAIL trap DEBUG
detailsdetailsdetailsdetails
12N-I pass N-I FAIL FAIL trap RETURN
detailsdetailsdetailsdetails
13N-I pass pass FAIL FAIL trap ERR and disable it
detailsdetailsdetails
14pass pass pass pass pass trap 0 is equivalent to EXIT
15N-I pass pass pass pass trap 1 is equivalent to SIGHUP; HUP is equivalent to SIGHUP
details
16pass pass pass pass pass eval in the exit trap (regression for issue #293)

62 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
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
dash4 SIGINT and INT are aliases

stdout:
1
0
stderr:
trap: SIGINT: bad trap
dash5 Invalid trap invocation

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

stdout:
status=0
stderr:
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
mksh9 trap EXIT with PARSE error

stdout:
FAILED
stderr:
_tmp/spec-bin/mksh: <stdin>[2]: syntax error: 'newline' unexpected
dash11 trap DEBUG

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

stdout:
1
2
stderr:
_tmp/spec-bin/mksh: <stdin>[4]: trap: bad signal 'DEBUG'
osh11 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' hook isn't yet implemented 
osh_ALT11 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' hook isn't yet implemented 
dash12 trap RETURN

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

stdout:
--
f
--
--
g
--
return-helper.sh
stderr:
_tmp/spec-bin/mksh: <stdin>[16]: trap: bad signal 'RETURN'
osh12 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' hook isn't yet implemented 
osh_ALT12 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' hook isn't yet implemented 
dash13 trap ERR and disable it

stdout:
1
2
3
stderr:
trap: ERR: bad trap
trap: ERR: bad trap
osh13 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' hook isn't yet implemented 
osh_ALT13 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' hook isn't yet implemented 
dash15 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