freebsd-dev/bin/sh/tests/builtins
Bryan Drewery a59f817491 sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap n n...'.
The parser considered 'trap exit INT' to reset the default for both EXIT and
INT. This beahvior is not POSIX compliant. This was avoided if a value was
specified for 'exit', but then disallows exiting with the signal received. A
possible workaround is using ' exit'.

However POSIX does allow this type of behavior if the parameters are all
integers. Fix the handling for this and clarify its support in the manpage
since it is specifically allowed by POSIX.

Differential Revision:	https://reviews.freebsd.org/D2325
Reviewed by:	jilles
MFC after:	2 weeks
2015-04-18 23:49:57 +00:00
..
alias3.0
alias3.0.stdout
alias4.0
alias.0
alias.0.stdout
alias.1
alias.1.stderr
break1.0
break2.0
break2.0.stdout
break3.0
break4.4
break5.4
break6.0 sh: Allow arbitrarily large numbers in break and continue. 2014-07-20 20:29:09 +00:00
builtin1.0
case1.0
case2.0
case3.0
case4.0
case5.0
case6.0
case7.0
case8.0
case9.0
case10.0
case11.0
case12.0
case13.0
case14.0
case15.0
case16.0
case17.0
case18.0
case19.0
cd1.0
cd2.0
cd3.0
cd4.0
cd5.0
cd6.0
cd7.0
cd8.0
command1.0
command2.0
command3.0
command3.0.stdout
command4.0
command5.0
command5.0.stdout
command6.0
command6.0.stdout
command7.0
command8.0
command9.0
command10.0
command11.0
command12.0
dot1.0
dot2.0
dot3.0
dot4.0
eval1.0
eval2.0
eval3.0
eval4.0
eval5.0
eval6.0
eval7.0 sh: Fix break/continue/return in multiline eval. 2014-10-12 13:12:06 +00:00
eval8.7 sh: Fix break/continue/return in multiline eval. 2014-10-12 13:12:06 +00:00
exec1.0
exec2.0
exit1.0
exit2.8
exit3.0
export1.0
fc1.0
fc2.0
for1.0
for2.0
for3.0
getopts1.0 sh: Send getopts error messages to stderr, not stdout. 2014-05-09 13:32:36 +00:00
getopts1.0.stdout
getopts2.0
getopts2.0.stdout
getopts3.0 sh: Add some tests for normal use of getopts. 2014-05-07 21:45:25 +00:00
getopts4.0 sh: Add some tests for normal use of getopts. 2014-05-07 21:45:25 +00:00
getopts5.0 sh: Add some tests for normal use of getopts. 2014-05-07 21:45:25 +00:00
getopts6.0 sh: Don't discard getopts state on unknown option or missing argument. 2014-05-10 17:42:21 +00:00
getopts7.0 sh: Don't discard getopts state on unknown option or missing argument. 2014-05-10 17:42:21 +00:00
getopts8.0 sh: In getopts, unset OPTARG where POSIX says we should. 2014-05-10 19:18:49 +00:00
getopts8.0.stdout sh: In getopts, unset OPTARG where POSIX says we should. 2014-05-10 19:18:49 +00:00
getopts9.0 sh: Make getopts memory-safe if with changing arguments. 2014-10-26 17:50:33 +00:00
getopts9.0.stdout sh: Make getopts memory-safe if with changing arguments. 2014-10-26 17:50:33 +00:00
hash1.0
hash1.0.stdout
hash2.0
hash2.0.stdout
hash3.0
hash3.0.stdout
hash4.0
jobid1.0
jobid2.0
kill1.0 sh: Successfully do nothing when killing a terminated job. 2014-03-08 19:44:34 +00:00
kill2.0 sh: Allow kill %job on jobs started without job control. 2014-03-15 14:58:48 +00:00
lineno2.0 sh: Do not corrupt internal representation if LINENO inner expansion fails. 2014-02-27 16:54:43 +00:00
lineno3.0 sh: Fix LINENO and prompt after $'\0 and newline. 2014-10-03 20:24:56 +00:00
lineno3.0.stdout sh: Fix LINENO and prompt after $'\0 and newline. 2014-10-03 20:24:56 +00:00
lineno.0
lineno.0.stdout
local1.0
local2.0
local3.0
local4.0
locale1.0
Makefile sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap n n...'. 2015-04-18 23:49:57 +00:00
printf1.0
printf2.0
printf3.0
printf4.0
read1.0
read1.0.stdout
read2.0
read3.0
read3.0.stdout
read4.0
read4.0.stdout
read5.0
read6.0
read7.0
return1.0
return2.1
return3.1
return4.0
return5.0
return6.4
return7.4
return8.0
set1.0
set2.0
trap1.0
trap2.0
trap3.0
trap4.0
trap5.0
trap6.0
trap7.0
trap8.0
trap9.0
trap10.0
trap11.0
trap12.0
trap13.0
trap14.0
trap15.0 sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap n n...'. 2015-04-18 23:49:57 +00:00
trap16.0 sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap n n...'. 2015-04-18 23:49:57 +00:00
type1.0
type1.0.stderr
type2.0
type3.0
unalias.0
var-assign2.0
var-assign.0
wait1.0
wait2.0
wait3.0
wait4.0
wait5.0
wait6.0
wait7.0
wait8.0
wait9.127
wait10.0