freebsd-nq/tools/regression/bin/sh/builtins
Jilles Tjoelker c1564db05d sh: Recognize "--" in . and exec.
Although "--" historically has not been required to be recognized for
certain special builtins that do not take options in POSIX, some other
implementations recognize options for them, requiring scripts to use "--" or
avoid operands starting with "-".

Operands starting with "-" can be avoided with eval by prepending a space,
and cannot occur with break, continue, exit, return and shift as they only
take numbers, nor with times as it does not take operands. With . and exec,
avoiding "-" is not so easy as it may require reimplementing the PATH
search; therefore the current proposal for POSIX is to require recognition
of "--" for them.

We continue to accept other strings starting with "-" as operands to . and
exec, and also "--" if it is alone to . (which would otherwise be invalid
anyway).
2010-05-28 22:40:24 +00:00
..
alias.0 Update test for r190284. 2009-03-22 21:12:00 +00:00
alias.0.stdout Update test for r190284. 2009-03-22 21:12:00 +00:00
alias.1
alias.1.stderr
builtin1.0 sh: Send the "not found" message for builtin <cmd> to redirected fd 2. 2010-01-03 15:01:38 +00:00
case1.0
case2.0 Generate some tests for sh's case command from the fnmatch tests. 2010-05-09 16:15:40 +00:00
case3.0 Generate some tests for sh's case command from the fnmatch tests. 2010-05-09 16:15:40 +00:00
cd1.0 Add a few very basic tests for cd -{L,P} and pwd -{L,P}. 2009-11-21 14:12:51 +00:00
cd2.0 Add a test for r199631. 2009-11-21 14:54:35 +00:00
command1.0
command2.0
command3.0
command3.0.stdout
command4.127
command5.0
command5.0.stdout Designate special builtins as such in command -V and type. 2009-06-24 22:04:04 +00:00
command6.0 sh: Allow command -pv and command -pV (lookup using _PATH_STDPATH). 2009-12-31 16:13:33 +00:00
command6.0.stdout sh: Allow command -pv and command -pV (lookup using _PATH_STDPATH). 2009-12-31 16:13:33 +00:00
command7.0 sh: Allow command -pv and command -pV (lookup using _PATH_STDPATH). 2009-12-31 16:13:33 +00:00
command8.0 sh: Improve the command builtin: 2010-03-06 16:57:53 +00:00
command9.0 sh: Make sure to popredir() even if a special builtin caused an error. 2010-03-06 17:09:22 +00:00
command10.0 sh: Make sure to popredir() even if a function caused an error. 2010-03-06 17:31:09 +00:00
command11.0 sh: Do not abort on a redirection error on a compound command. 2010-03-14 14:24:35 +00:00
dot1.0 sh: Add some simple tests for ., exec and return from . script. 2010-05-28 22:08:34 +00:00
dot2.0 sh: Recognize "--" in . and exec. 2010-05-28 22:40:24 +00:00
eval1.0 Add tests for r193169. 2009-05-31 17:23:27 +00:00
eval2.0 Add test for r190698. 2009-06-24 20:22:54 +00:00
eval3.0 Add some tests for a fixed bug in an uncommitted patch. 2009-08-27 22:23:23 +00:00
exec1.0 sh: Add some simple tests for ., exec and return from . script. 2010-05-28 22:08:34 +00:00
exec2.0 sh: Recognize "--" in . and exec. 2010-05-28 22:40:24 +00:00
fc1.0 Disable job control when running 'sh -i' in the testsuite. 2009-11-29 22:58:10 +00:00
fc2.0 sh: Do not run callers' exception handlers in subshells. 2009-12-25 20:21:35 +00:00
getopts1.0 Add a test case for options.c revision 1.26. 2008-03-22 14:07:49 +00:00
getopts1.0.stdout Add a test case for options.c revision 1.26. 2008-03-22 14:07:49 +00:00
getopts2.0 Add a test for r182300. 2008-08-27 20:26:34 +00:00
getopts2.0.stdout Add a test for r182300. 2008-08-27 20:26:34 +00:00
hash1.0
hash1.0.stdout
hash2.0
hash2.0.stdout
hash3.0
hash3.0.stdout
lineno.0 Test the expansion of $LINENO. 2008-05-15 19:58:44 +00:00
lineno.0.stdout Test the expansion of $LINENO. 2008-05-15 19:58:44 +00:00
locale1.0 sh: Apply locale vars on builtins, recognize LC_MESSAGES as a locale var. 2010-05-05 21:48:40 +00:00
read1.0 Test the r190298 change. 2009-03-22 23:00:52 +00:00
read1.0.stdout Test the r190298 change. 2009-03-22 23:00:52 +00:00
return1.0
return2.1
return3.1
return4.0 sh: Add some simple tests for ., exec and return from . script. 2010-05-28 22:08:34 +00:00
trap1.0 Add tests for r194127 and r194128. 2009-06-14 16:21:51 +00:00
trap2.0 Add tests for r194406 and r194516. 2009-06-19 22:15:59 +00:00
trap3.0 trap: do not consider a bad signal name a fatal error. 2009-11-21 20:44:34 +00:00
type1.0
type1.0.stderr Update for 185401, errors now go to stderr. 2008-11-28 18:59:04 +00:00
type2.0 sh: Use PATH= assignment in type. 2009-12-31 17:44:24 +00:00
unalias.0
var-assign2.0 Fix error in comment. 2010-05-09 17:15:26 +00:00
var-assign.0
wait1.0 sh: Add some simplistic tests for the wait builtin. 2010-05-23 22:10:20 +00:00
wait2.0 sh: Add some simplistic tests for the wait builtin. 2010-05-23 22:10:20 +00:00