diff options
Diffstat (limited to 'bin/sh/tests/builtins')
182 files changed, 25 insertions, 182 deletions
diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile index f9b464a6da4b..7fdecb23c817 100644 --- a/bin/sh/tests/builtins/Makefile +++ b/bin/sh/tests/builtins/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - PACKAGE= tests .include <src.opts.mk> @@ -54,6 +52,7 @@ ${PACKAGE}FILES+= cd8.0 ${PACKAGE}FILES+= cd9.0 cd9.0.stdout ${PACKAGE}FILES+= cd10.0 ${PACKAGE}FILES+= cd11.0 +${PACKAGE}FILES+= cd12.0 cd12.0.stderr ${PACKAGE}FILES+= command1.0 ${PACKAGE}FILES+= command2.0 ${PACKAGE}FILES+= command3.0 @@ -94,6 +93,7 @@ ${PACKAGE}FILES+= exit3.0 ${PACKAGE}FILES+= export1.0 ${PACKAGE}FILES+= fc1.0 ${PACKAGE}FILES+= fc2.0 +${PACKAGE}FILES+= fc3.0 fc3.0.stdout fc3.0.stderr ${PACKAGE}FILES+= for1.0 ${PACKAGE}FILES+= for2.0 ${PACKAGE}FILES+= for3.0 diff --git a/bin/sh/tests/builtins/Makefile.depend b/bin/sh/tests/builtins/Makefile.depend index f80275d86ab1..11aba52f82cf 100644 --- a/bin/sh/tests/builtins/Makefile.depend +++ b/bin/sh/tests/builtins/Makefile.depend @@ -1,4 +1,3 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ diff --git a/bin/sh/tests/builtins/alias.0 b/bin/sh/tests/builtins/alias.0 index d9b27969cfd6..0da2587e3b52 100644 --- a/bin/sh/tests/builtins/alias.0 +++ b/bin/sh/tests/builtins/alias.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e unalias -a diff --git a/bin/sh/tests/builtins/alias.1 b/bin/sh/tests/builtins/alias.1 index 31403dc760bf..755d1f59aeae 100644 --- a/bin/sh/tests/builtins/alias.1 +++ b/bin/sh/tests/builtins/alias.1 @@ -1,3 +1,2 @@ -# $FreeBSD$ unalias -a alias foo diff --git a/bin/sh/tests/builtins/alias3.0 b/bin/sh/tests/builtins/alias3.0 index fe65e31f5f03..b0edcbc1b814 100644 --- a/bin/sh/tests/builtins/alias3.0 +++ b/bin/sh/tests/builtins/alias3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e unalias -a diff --git a/bin/sh/tests/builtins/alias4.0 b/bin/sh/tests/builtins/alias4.0 index 3d5efeccf2c7..0e93513546f0 100644 --- a/bin/sh/tests/builtins/alias4.0 +++ b/bin/sh/tests/builtins/alias4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ unalias -a alias -- diff --git a/bin/sh/tests/builtins/break1.0 b/bin/sh/tests/builtins/break1.0 index ba0cbb4bd268..910a003c609e 100644 --- a/bin/sh/tests/builtins/break1.0 +++ b/bin/sh/tests/builtins/break1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ if [ "$1" != nested ]; then while :; do diff --git a/bin/sh/tests/builtins/break2.0 b/bin/sh/tests/builtins/break2.0 index ff52dd321469..43d037c10ee7 100644 --- a/bin/sh/tests/builtins/break2.0 +++ b/bin/sh/tests/builtins/break2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # It is not immediately obvious that this should work, and someone probably # relies on it. diff --git a/bin/sh/tests/builtins/break3.0 b/bin/sh/tests/builtins/break3.0 index 10a5ca88edff..fe73dac6befe 100644 --- a/bin/sh/tests/builtins/break3.0 +++ b/bin/sh/tests/builtins/break3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # We accept this and people might rely on it. # However, various other shells do not accept it. diff --git a/bin/sh/tests/builtins/break4.4 b/bin/sh/tests/builtins/break4.4 index d52ff52be4d4..24f804cff385 100644 --- a/bin/sh/tests/builtins/break4.4 +++ b/bin/sh/tests/builtins/break4.4 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Although this is not specified by POSIX, some configure scripts (gawk 4.1.0) # appear to depend on it. diff --git a/bin/sh/tests/builtins/break5.4 b/bin/sh/tests/builtins/break5.4 index 7df8e186311c..161c376823bb 100644 --- a/bin/sh/tests/builtins/break5.4 +++ b/bin/sh/tests/builtins/break5.4 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Although this is not specified by POSIX, some configure scripts (gawk 4.1.0) # appear to depend on it. diff --git a/bin/sh/tests/builtins/break6.0 b/bin/sh/tests/builtins/break6.0 index 09fc0d85eaa3..6d8a0f2b3f97 100644 --- a/bin/sh/tests/builtins/break6.0 +++ b/bin/sh/tests/builtins/break6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Per POSIX, this need only work if LONG_MAX > 4294967295. while :; do diff --git a/bin/sh/tests/builtins/builtin1.0 b/bin/sh/tests/builtins/builtin1.0 index b6083858f671..e52abf27c78a 100644 --- a/bin/sh/tests/builtins/builtin1.0 +++ b/bin/sh/tests/builtins/builtin1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures=0 diff --git a/bin/sh/tests/builtins/case1.0 b/bin/sh/tests/builtins/case1.0 index 860fc67dacda..3a89fd2c3729 100644 --- a/bin/sh/tests/builtins/case1.0 +++ b/bin/sh/tests/builtins/case1.0 @@ -1,4 +1,3 @@ -#$FreeBSD$ f() { false diff --git a/bin/sh/tests/builtins/case10.0 b/bin/sh/tests/builtins/case10.0 index a627b5cd996f..a0f2a988294e 100644 --- a/bin/sh/tests/builtins/case10.0 +++ b/bin/sh/tests/builtins/case10.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case ! in [\!!]) ;; diff --git a/bin/sh/tests/builtins/case11.0 b/bin/sh/tests/builtins/case11.0 index 0e66e11f0dee..50acd5db8e5b 100644 --- a/bin/sh/tests/builtins/case11.0 +++ b/bin/sh/tests/builtins/case11.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ false case x in diff --git a/bin/sh/tests/builtins/case12.0 b/bin/sh/tests/builtins/case12.0 index 2a442ba7993a..9a4975b819c3 100644 --- a/bin/sh/tests/builtins/case12.0 +++ b/bin/sh/tests/builtins/case12.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ false case x in diff --git a/bin/sh/tests/builtins/case13.0 b/bin/sh/tests/builtins/case13.0 index 78f4e9bdffde..83a26869da87 100644 --- a/bin/sh/tests/builtins/case13.0 +++ b/bin/sh/tests/builtins/case13.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case ^ in [\^^]) ;; diff --git a/bin/sh/tests/builtins/case14.0 b/bin/sh/tests/builtins/case14.0 index 0338e8a224e3..b3cf26c922a2 100644 --- a/bin/sh/tests/builtins/case14.0 +++ b/bin/sh/tests/builtins/case14.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case `false` in no) exit 3 ;; diff --git a/bin/sh/tests/builtins/case15.0 b/bin/sh/tests/builtins/case15.0 index 09b0e1133544..e0b2d70e5832 100644 --- a/bin/sh/tests/builtins/case15.0 +++ b/bin/sh/tests/builtins/case15.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case x in `false`) exit 3 ;; diff --git a/bin/sh/tests/builtins/case16.0 b/bin/sh/tests/builtins/case16.0 index 24303027ba91..e1ec8f1c9272 100644 --- a/bin/sh/tests/builtins/case16.0 +++ b/bin/sh/tests/builtins/case16.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { return 42; } f diff --git a/bin/sh/tests/builtins/case17.0 b/bin/sh/tests/builtins/case17.0 index ed1d25f0277a..42ff0ee4a90f 100644 --- a/bin/sh/tests/builtins/case17.0 +++ b/bin/sh/tests/builtins/case17.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ ! case x in x) false ;& y) esac diff --git a/bin/sh/tests/builtins/case18.0 b/bin/sh/tests/builtins/case18.0 index 470253f622ea..76f4d6743503 100644 --- a/bin/sh/tests/builtins/case18.0 +++ b/bin/sh/tests/builtins/case18.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case x$(false) in x) ;& diff --git a/bin/sh/tests/builtins/case19.0 b/bin/sh/tests/builtins/case19.0 index 215066ad6321..2e8a2ec77f53 100644 --- a/bin/sh/tests/builtins/case19.0 +++ b/bin/sh/tests/builtins/case19.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ [ "`case x in x) false ;& diff --git a/bin/sh/tests/builtins/case2.0 b/bin/sh/tests/builtins/case2.0 index e319148cdf5d..37d5f8c28503 100644 --- a/bin/sh/tests/builtins/case2.0 +++ b/bin/sh/tests/builtins/case2.0 @@ -1,5 +1,4 @@ # Generated by ./test-fnmatch -s 1, do not edit. -# $FreeBSD$ failures= failed() { printf '%s\n' "Failed: $1 '$2' '$3'"; failures=x$failures; } testmatch() { eval "case \$2 in ''$1) ;; *) failed testmatch \"\$@\";; esac"; } diff --git a/bin/sh/tests/builtins/case20.0 b/bin/sh/tests/builtins/case20.0 index 03a4eb2c9a23..800afa0db9fd 100644 --- a/bin/sh/tests/builtins/case20.0 +++ b/bin/sh/tests/builtins/case20.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Shells do not agree about what this pattern should match, but it is # certain that it must not crash and the missing close bracket must not diff --git a/bin/sh/tests/builtins/case21.0 b/bin/sh/tests/builtins/case21.0 index ea7fb054a546..426ce8b4b08c 100644 --- a/bin/sh/tests/builtins/case21.0 +++ b/bin/sh/tests/builtins/case21.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case 5 in [0$((-9))]) ;; diff --git a/bin/sh/tests/builtins/case22.0 b/bin/sh/tests/builtins/case22.0 index ddc80051fa0a..5c36c483da44 100644 --- a/bin/sh/tests/builtins/case22.0 +++ b/bin/sh/tests/builtins/case22.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case 5 in [0"$((-9))"]) echo bad1 ;; diff --git a/bin/sh/tests/builtins/case23.0 b/bin/sh/tests/builtins/case23.0 index ce03cf96d62e..27fc79a65a68 100644 --- a/bin/sh/tests/builtins/case23.0 +++ b/bin/sh/tests/builtins/case23.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case [ in [[:alpha:]]) echo bad diff --git a/bin/sh/tests/builtins/case3.0 b/bin/sh/tests/builtins/case3.0 index 42e53d62a3cb..06080f9ec3dc 100644 --- a/bin/sh/tests/builtins/case3.0 +++ b/bin/sh/tests/builtins/case3.0 @@ -1,5 +1,4 @@ # Generated by ./test-fnmatch -s 2, do not edit. -# $FreeBSD$ failures= failed() { printf '%s\n' "Failed: $1 '$2' '$3'"; failures=x$failures; } # We do not treat a backslash specially in this case, diff --git a/bin/sh/tests/builtins/case4.0 b/bin/sh/tests/builtins/case4.0 index 18219f51ee09..abac705a8491 100644 --- a/bin/sh/tests/builtins/case4.0 +++ b/bin/sh/tests/builtins/case4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -- "*" case x in diff --git a/bin/sh/tests/builtins/case5.0 b/bin/sh/tests/builtins/case5.0 index 8c6db5ab8e57..118e001b8aa7 100644 --- a/bin/sh/tests/builtins/case5.0 +++ b/bin/sh/tests/builtins/case5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ unset LC_ALL LC_CTYPE=en_US.UTF-8 diff --git a/bin/sh/tests/builtins/case6.0 b/bin/sh/tests/builtins/case6.0 index 8d791831c3d8..2ea777aa7ea8 100644 --- a/bin/sh/tests/builtins/case6.0 +++ b/bin/sh/tests/builtins/case6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ unset LC_ALL LC_CTYPE=de_DE.ISO8859-1 diff --git a/bin/sh/tests/builtins/case7.0 b/bin/sh/tests/builtins/case7.0 index 96b9de66fe27..6c8e632fbda9 100644 --- a/bin/sh/tests/builtins/case7.0 +++ b/bin/sh/tests/builtins/case7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Character ranges in a locale other than the POSIX locale, not specified # by POSIX. diff --git a/bin/sh/tests/builtins/case8.0 b/bin/sh/tests/builtins/case8.0 index 8d9f8b604d88..01b5fdf35a7b 100644 --- a/bin/sh/tests/builtins/case8.0 +++ b/bin/sh/tests/builtins/case8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ case aZ_ in [[:alpha:]_][[:upper:]_][[:alpha:]_]) ;; diff --git a/bin/sh/tests/builtins/case9.0 b/bin/sh/tests/builtins/case9.0 index 476caec261ba..7719ba195126 100644 --- a/bin/sh/tests/builtins/case9.0 +++ b/bin/sh/tests/builtins/case9.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ errors=0 diff --git a/bin/sh/tests/builtins/cd1.0 b/bin/sh/tests/builtins/cd1.0 index bc5108e6be3b..52d165df5ae2 100644 --- a/bin/sh/tests/builtins/cd1.0 +++ b/bin/sh/tests/builtins/cd1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e P=${TMPDIR:-/tmp} diff --git a/bin/sh/tests/builtins/cd10.0 b/bin/sh/tests/builtins/cd10.0 index f4b5e0ffca5c..07396e8e0411 100644 --- a/bin/sh/tests/builtins/cd10.0 +++ b/bin/sh/tests/builtins/cd10.0 @@ -1,6 +1,5 @@ -# $FreeBSD$ # Precondition (cd /bin) || exit # Verify write error is ignored. -$SH +m -ic 'CDPATH=/:; cd bin 1</dev/null' +ENV= $SH +m -ic 'CDPATH=/:; cd bin 1</dev/null' diff --git a/bin/sh/tests/builtins/cd11.0 b/bin/sh/tests/builtins/cd11.0 index 53e63f736f30..04e3469f8f3e 100644 --- a/bin/sh/tests/builtins/cd11.0 +++ b/bin/sh/tests/builtins/cd11.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e T=$(mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXX") diff --git a/bin/sh/tests/builtins/cd12.0 b/bin/sh/tests/builtins/cd12.0 new file mode 100644 index 000000000000..34bc053afd1e --- /dev/null +++ b/bin/sh/tests/builtins/cd12.0 @@ -0,0 +1,3 @@ +(cd /bin) || exit 1 +cd "" && exit 1 +exit 0 diff --git a/bin/sh/tests/builtins/cd12.0.stderr b/bin/sh/tests/builtins/cd12.0.stderr new file mode 100644 index 000000000000..cce88588b909 --- /dev/null +++ b/bin/sh/tests/builtins/cd12.0.stderr @@ -0,0 +1 @@ +cd: : No such file or directory diff --git a/bin/sh/tests/builtins/cd2.0 b/bin/sh/tests/builtins/cd2.0 index f2b6416a12ec..eea39115c3de 100644 --- a/bin/sh/tests/builtins/cd2.0 +++ b/bin/sh/tests/builtins/cd2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e L=$(getconf PATH_MAX / 2>/dev/null) || L=4096 diff --git a/bin/sh/tests/builtins/cd3.0 b/bin/sh/tests/builtins/cd3.0 index 7729c54a6895..d7211f5c5084 100644 --- a/bin/sh/tests/builtins/cd3.0 +++ b/bin/sh/tests/builtins/cd3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # If fully successful, cd -Pe must be like cd -P. diff --git a/bin/sh/tests/builtins/cd4.0 b/bin/sh/tests/builtins/cd4.0 index df3a9a48961c..33cf73632247 100644 --- a/bin/sh/tests/builtins/cd4.0 +++ b/bin/sh/tests/builtins/cd4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # This test assumes that whatever mechanism cd -P uses to determine the # pathname to the current directory if it is longer than PATH_MAX requires diff --git a/bin/sh/tests/builtins/cd5.0 b/bin/sh/tests/builtins/cd5.0 index 3dff604583c9..ecb0d55a850b 100644 --- a/bin/sh/tests/builtins/cd5.0 +++ b/bin/sh/tests/builtins/cd5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e T=$(mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXX") diff --git a/bin/sh/tests/builtins/cd6.0 b/bin/sh/tests/builtins/cd6.0 index 083a06190e64..27f14172be65 100644 --- a/bin/sh/tests/builtins/cd6.0 +++ b/bin/sh/tests/builtins/cd6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e cd -P /bin diff --git a/bin/sh/tests/builtins/cd7.0 b/bin/sh/tests/builtins/cd7.0 index 9adda86c1aed..5b656f422f02 100644 --- a/bin/sh/tests/builtins/cd7.0 +++ b/bin/sh/tests/builtins/cd7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e cd /usr/bin diff --git a/bin/sh/tests/builtins/cd8.0 b/bin/sh/tests/builtins/cd8.0 index a68f77f26f75..3aff675d8dce 100644 --- a/bin/sh/tests/builtins/cd8.0 +++ b/bin/sh/tests/builtins/cd8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # The exact wording of the error message is not standardized, but giving # a description of the errno is useful. diff --git a/bin/sh/tests/builtins/cd9.0 b/bin/sh/tests/builtins/cd9.0 index 78bcdff9a933..811d75fff03d 100644 --- a/bin/sh/tests/builtins/cd9.0 +++ b/bin/sh/tests/builtins/cd9.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ cd /dev cd /bin diff --git a/bin/sh/tests/builtins/command1.0 b/bin/sh/tests/builtins/command1.0 index fd0afdfa0300..2f2b36bb6d2a 100644 --- a/bin/sh/tests/builtins/command1.0 +++ b/bin/sh/tests/builtins/command1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ true() { false } diff --git a/bin/sh/tests/builtins/command10.0 b/bin/sh/tests/builtins/command10.0 index 2c1adf1eb0bd..add9e8372b0e 100644 --- a/bin/sh/tests/builtins/command10.0 +++ b/bin/sh/tests/builtins/command10.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures=0 diff --git a/bin/sh/tests/builtins/command11.0 b/bin/sh/tests/builtins/command11.0 index 10c86479d81b..9dc793d2f4f3 100644 --- a/bin/sh/tests/builtins/command11.0 +++ b/bin/sh/tests/builtins/command11.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures=0 diff --git a/bin/sh/tests/builtins/command12.0 b/bin/sh/tests/builtins/command12.0 index f981db324946..a602a48cfcca 100644 --- a/bin/sh/tests/builtins/command12.0 +++ b/bin/sh/tests/builtins/command12.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ alias aa=echo\ \'\"\' cmd=$(command -v aa) diff --git a/bin/sh/tests/builtins/command13.0 b/bin/sh/tests/builtins/command13.0 index 7c011c938a47..668664780ad0 100644 --- a/bin/sh/tests/builtins/command13.0 +++ b/bin/sh/tests/builtins/command13.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures=0 diff --git a/bin/sh/tests/builtins/command14.0 b/bin/sh/tests/builtins/command14.0 index 5f6f4447ef61..6e4f0fd5822d 100644 --- a/bin/sh/tests/builtins/command14.0 +++ b/bin/sh/tests/builtins/command14.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ r=`cd /bin && PATH=. command -V ls` case $r in diff --git a/bin/sh/tests/builtins/command2.0 b/bin/sh/tests/builtins/command2.0 index ff7b5f2c8dc8..0f6c76bf895f 100644 --- a/bin/sh/tests/builtins/command2.0 +++ b/bin/sh/tests/builtins/command2.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ PATH= command -p cat < /dev/null diff --git a/bin/sh/tests/builtins/command3.0 b/bin/sh/tests/builtins/command3.0 index 9d4ae89e0e2e..d9e85caff744 100644 --- a/bin/sh/tests/builtins/command3.0 +++ b/bin/sh/tests/builtins/command3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ command -v ls command -v true command -v /bin/ls diff --git a/bin/sh/tests/builtins/command4.0 b/bin/sh/tests/builtins/command4.0 index 3e496137ff58..b2b0146fb56a 100644 --- a/bin/sh/tests/builtins/command4.0 +++ b/bin/sh/tests/builtins/command4.0 @@ -1,2 +1 @@ -# $FreeBSD$ ! command -v nonexisting diff --git a/bin/sh/tests/builtins/command5.0 b/bin/sh/tests/builtins/command5.0 index 13b3fe1fe3f4..050b44913f2d 100644 --- a/bin/sh/tests/builtins/command5.0 +++ b/bin/sh/tests/builtins/command5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ command -V ls command -V true command -V /bin/ls diff --git a/bin/sh/tests/builtins/command6.0 b/bin/sh/tests/builtins/command6.0 index 5b63bfecc0f0..56d65a095ab4 100644 --- a/bin/sh/tests/builtins/command6.0 +++ b/bin/sh/tests/builtins/command6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ PATH=/var/empty case $(command -pV ls) in */var/empty/ls*) diff --git a/bin/sh/tests/builtins/command7.0 b/bin/sh/tests/builtins/command7.0 index fc652f207584..f45809ddc86b 100644 --- a/bin/sh/tests/builtins/command7.0 +++ b/bin/sh/tests/builtins/command7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures=0 diff --git a/bin/sh/tests/builtins/command8.0 b/bin/sh/tests/builtins/command8.0 index 9e3a2b645fbb..df50cb4f973b 100644 --- a/bin/sh/tests/builtins/command8.0 +++ b/bin/sh/tests/builtins/command8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ IFS=, SPECIAL="break,\ diff --git a/bin/sh/tests/builtins/command9.0 b/bin/sh/tests/builtins/command9.0 index 212e52aafc98..3dbc1e0a433b 100644 --- a/bin/sh/tests/builtins/command9.0 +++ b/bin/sh/tests/builtins/command9.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures=0 diff --git a/bin/sh/tests/builtins/dot1.0 b/bin/sh/tests/builtins/dot1.0 index 43eab0ddeb33..0ecfb7ef4886 100644 --- a/bin/sh/tests/builtins/dot1.0 +++ b/bin/sh/tests/builtins/dot1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/dot2.0 b/bin/sh/tests/builtins/dot2.0 index ed6379b993c3..497e2139513a 100644 --- a/bin/sh/tests/builtins/dot2.0 +++ b/bin/sh/tests/builtins/dot2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/dot3.0 b/bin/sh/tests/builtins/dot3.0 index b337f0f6d338..9017a52d816b 100644 --- a/bin/sh/tests/builtins/dot3.0 +++ b/bin/sh/tests/builtins/dot3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # . should return 0 if no command was executed. diff --git a/bin/sh/tests/builtins/dot4.0 b/bin/sh/tests/builtins/dot4.0 index b898131c0e1c..c9cf7ec67f6f 100644 --- a/bin/sh/tests/builtins/dot4.0 +++ b/bin/sh/tests/builtins/dot4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ v=abcd v=$v$v$v$v diff --git a/bin/sh/tests/builtins/echo1.0 b/bin/sh/tests/builtins/echo1.0 index 75ed8fbbc45f..6b9b14da832e 100644 --- a/bin/sh/tests/builtins/echo1.0 +++ b/bin/sh/tests/builtins/echo1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Not specified by POSIX. diff --git a/bin/sh/tests/builtins/echo2.0 b/bin/sh/tests/builtins/echo2.0 index 254b5c4dca4f..9d8d9817e9a8 100644 --- a/bin/sh/tests/builtins/echo2.0 +++ b/bin/sh/tests/builtins/echo2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Not specified by POSIX. diff --git a/bin/sh/tests/builtins/echo3.0 b/bin/sh/tests/builtins/echo3.0 index ff8f6c2f26e4..a56d3da07aad 100644 --- a/bin/sh/tests/builtins/echo3.0 +++ b/bin/sh/tests/builtins/echo3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Not specified by POSIX. diff --git a/bin/sh/tests/builtins/eval1.0 b/bin/sh/tests/builtins/eval1.0 index 04606a4a87fe..9019d3b9bb98 100644 --- a/bin/sh/tests/builtins/eval1.0 +++ b/bin/sh/tests/builtins/eval1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e eval diff --git a/bin/sh/tests/builtins/eval2.0 b/bin/sh/tests/builtins/eval2.0 index bf06b6e14e0c..b762ac2eea76 100644 --- a/bin/sh/tests/builtins/eval2.0 +++ b/bin/sh/tests/builtins/eval2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ eval ' false diff --git a/bin/sh/tests/builtins/eval3.0 b/bin/sh/tests/builtins/eval3.0 index dfb8357c727c..12f36dc00dfd 100644 --- a/bin/sh/tests/builtins/eval3.0 +++ b/bin/sh/tests/builtins/eval3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ eval 'false;' && exit 1 eval 'true;' || exit 1 diff --git a/bin/sh/tests/builtins/eval4.0 b/bin/sh/tests/builtins/eval4.0 index 67da2f5c832d..3eb4e3679fe7 100644 --- a/bin/sh/tests/builtins/eval4.0 +++ b/bin/sh/tests/builtins/eval4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # eval should preserve $? from command substitutions when starting # the parsed command. diff --git a/bin/sh/tests/builtins/eval5.0 b/bin/sh/tests/builtins/eval5.0 index 3e86de92fbae..44d125408deb 100644 --- a/bin/sh/tests/builtins/eval5.0 +++ b/bin/sh/tests/builtins/eval5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # eval should return 0 if no command was executed. eval $(false) diff --git a/bin/sh/tests/builtins/eval6.0 b/bin/sh/tests/builtins/eval6.0 index 6752bb65ad4d..84584f1c1bf3 100644 --- a/bin/sh/tests/builtins/eval6.0 +++ b/bin/sh/tests/builtins/eval6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # eval should preserve $? from command substitutions when starting # the parsed command. diff --git a/bin/sh/tests/builtins/eval7.0 b/bin/sh/tests/builtins/eval7.0 index a309c917b102..238353fb5c5d 100644 --- a/bin/sh/tests/builtins/eval7.0 +++ b/bin/sh/tests/builtins/eval7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Assumes that break can break out of a loop outside eval. while :; do diff --git a/bin/sh/tests/builtins/eval8.7 b/bin/sh/tests/builtins/eval8.7 index af6064c388df..671fcb5cb190 100644 --- a/bin/sh/tests/builtins/eval8.7 +++ b/bin/sh/tests/builtins/eval8.7 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { eval "return 7 diff --git a/bin/sh/tests/builtins/exec1.0 b/bin/sh/tests/builtins/exec1.0 index dd30a4c9aa93..a3d993a739eb 100644 --- a/bin/sh/tests/builtins/exec1.0 +++ b/bin/sh/tests/builtins/exec1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/exec2.0 b/bin/sh/tests/builtins/exec2.0 index 3dcb6c41156a..9ed1013acd92 100644 --- a/bin/sh/tests/builtins/exec2.0 +++ b/bin/sh/tests/builtins/exec2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/exit1.0 b/bin/sh/tests/builtins/exit1.0 index 496d448761cc..fb6486cebeac 100644 --- a/bin/sh/tests/builtins/exit1.0 +++ b/bin/sh/tests/builtins/exit1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # exit with an argument should overwrite the exit status in an EXIT trap. diff --git a/bin/sh/tests/builtins/exit2.8 b/bin/sh/tests/builtins/exit2.8 index 124c32e01a3c..327b620c3fa6 100644 --- a/bin/sh/tests/builtins/exit2.8 +++ b/bin/sh/tests/builtins/exit2.8 @@ -1,4 +1,3 @@ -# $FreeBSD$ # exit without arguments is the same as exit $? outside a trap. diff --git a/bin/sh/tests/builtins/exit3.0 b/bin/sh/tests/builtins/exit3.0 index 80655ac539c5..996074c10182 100644 --- a/bin/sh/tests/builtins/exit3.0 +++ b/bin/sh/tests/builtins/exit3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # exit without arguments differs from exit $? in an EXIT trap. diff --git a/bin/sh/tests/builtins/export1.0 b/bin/sh/tests/builtins/export1.0 index 7b08c9de4349..e2802c4f8e89 100644 --- a/bin/sh/tests/builtins/export1.0 +++ b/bin/sh/tests/builtins/export1.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ env @badness=1 ${SH} -c 'v=`export -p`; eval "$v"' diff --git a/bin/sh/tests/builtins/fc1.0 b/bin/sh/tests/builtins/fc1.0 index ab7a387b5077..c84fb0549012 100644 --- a/bin/sh/tests/builtins/fc1.0 +++ b/bin/sh/tests/builtins/fc1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e trap 'echo Broken pipe -- test failed' PIPE @@ -8,7 +7,7 @@ T=$(mktemp -d sh-test.XXXXXX) cd $T mkfifo input output error -HISTFILE=/dev/null ${SH} +m -i <input >output 2>error & +ENV= HISTFILE=/dev/null ${SH} +m -i <input >output 2>error & { # Syntax error echo ')' >&3 diff --git a/bin/sh/tests/builtins/fc2.0 b/bin/sh/tests/builtins/fc2.0 index 7eb92acc2cdf..53c0f786cda2 100644 --- a/bin/sh/tests/builtins/fc2.0 +++ b/bin/sh/tests/builtins/fc2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e trap 'echo Broken pipe -- test failed' PIPE diff --git a/bin/sh/tests/builtins/fc3.0 b/bin/sh/tests/builtins/fc3.0 new file mode 100644 index 000000000000..daa615bcc3ca --- /dev/null +++ b/bin/sh/tests/builtins/fc3.0 @@ -0,0 +1,9 @@ +export PS1='_ ' # cannot predict whether ran by root or not + +echo ': command1 +: command2 +: command3 +: command4 +fc -l -n -1 +fc -ln 2 3 +' | ENV= HISTFILE=/dev/null ${SH} +m -i diff --git a/bin/sh/tests/builtins/fc3.0.stderr b/bin/sh/tests/builtins/fc3.0.stderr new file mode 100644 index 000000000000..e05147fb8209 --- /dev/null +++ b/bin/sh/tests/builtins/fc3.0.stderr @@ -0,0 +1 @@ +_ _ _ _ _ _ _ _ diff --git a/bin/sh/tests/builtins/fc3.0.stdout b/bin/sh/tests/builtins/fc3.0.stdout new file mode 100644 index 000000000000..8c23c913635d --- /dev/null +++ b/bin/sh/tests/builtins/fc3.0.stdout @@ -0,0 +1,3 @@ +: command4 +: command2 +: command3 diff --git a/bin/sh/tests/builtins/for1.0 b/bin/sh/tests/builtins/for1.0 index cd55e2ca029e..f1a64f412bc4 100644 --- a/bin/sh/tests/builtins/for1.0 +++ b/bin/sh/tests/builtins/for1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ false for i in `false`; do exit 3; done diff --git a/bin/sh/tests/builtins/for2.0 b/bin/sh/tests/builtins/for2.0 index 48c22ce71119..0ed4e1158eaa 100644 --- a/bin/sh/tests/builtins/for2.0 +++ b/bin/sh/tests/builtins/for2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ r=x f() { return 42; } diff --git a/bin/sh/tests/builtins/for3.0 b/bin/sh/tests/builtins/for3.0 index cc37238abbc6..010606b16c75 100644 --- a/bin/sh/tests/builtins/for3.0 +++ b/bin/sh/tests/builtins/for3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ r=x f() { return 42; } diff --git a/bin/sh/tests/builtins/getopts1.0 b/bin/sh/tests/builtins/getopts1.0 index 10d2b59208e5..928f472900e6 100644 --- a/bin/sh/tests/builtins/getopts1.0 +++ b/bin/sh/tests/builtins/getopts1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ printf -- '-1-\n' set -- -abc diff --git a/bin/sh/tests/builtins/getopts10.0 b/bin/sh/tests/builtins/getopts10.0 index a88e6ca3e85e..5182da24a0b0 100644 --- a/bin/sh/tests/builtins/getopts10.0 +++ b/bin/sh/tests/builtins/getopts10.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -- -x arg opt=not diff --git a/bin/sh/tests/builtins/getopts2.0 b/bin/sh/tests/builtins/getopts2.0 index 1bd2c32db81c..b12813e6247d 100644 --- a/bin/sh/tests/builtins/getopts2.0 +++ b/bin/sh/tests/builtins/getopts2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set - -ax getopts ax option set -C diff --git a/bin/sh/tests/builtins/getopts3.0 b/bin/sh/tests/builtins/getopts3.0 index d02469b20469..c52e60ada860 100644 --- a/bin/sh/tests/builtins/getopts3.0 +++ b/bin/sh/tests/builtins/getopts3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ shift $# getopts x opt diff --git a/bin/sh/tests/builtins/getopts4.0 b/bin/sh/tests/builtins/getopts4.0 index 61d5c2b6b15c..f4df551cb571 100644 --- a/bin/sh/tests/builtins/getopts4.0 +++ b/bin/sh/tests/builtins/getopts4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -- -x opt=not diff --git a/bin/sh/tests/builtins/getopts5.0 b/bin/sh/tests/builtins/getopts5.0 index 666ee7652de5..d037b9705882 100644 --- a/bin/sh/tests/builtins/getopts5.0 +++ b/bin/sh/tests/builtins/getopts5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -- -x arg opt=not diff --git a/bin/sh/tests/builtins/getopts6.0 b/bin/sh/tests/builtins/getopts6.0 index 1d3c39ba953e..5cf2bc462915 100644 --- a/bin/sh/tests/builtins/getopts6.0 +++ b/bin/sh/tests/builtins/getopts6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -- -x -y getopts :x var || echo "First getopts bad: $?" diff --git a/bin/sh/tests/builtins/getopts7.0 b/bin/sh/tests/builtins/getopts7.0 index 3745555f8c1a..5dd5ed593c27 100644 --- a/bin/sh/tests/builtins/getopts7.0 +++ b/bin/sh/tests/builtins/getopts7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -- -x getopts :x: var diff --git a/bin/sh/tests/builtins/getopts8.0 b/bin/sh/tests/builtins/getopts8.0 index da4af6bd0b56..30b36630c7b0 100644 --- a/bin/sh/tests/builtins/getopts8.0 +++ b/bin/sh/tests/builtins/getopts8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -- -yz -wx opt=wrong1 OPTARG=wrong2 diff --git a/bin/sh/tests/builtins/getopts9.0 b/bin/sh/tests/builtins/getopts9.0 index 1c35fc68c2d1..5e91f92614dd 100644 --- a/bin/sh/tests/builtins/getopts9.0 +++ b/bin/sh/tests/builtins/getopts9.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ args='-ab' getopts ab opt $args diff --git a/bin/sh/tests/builtins/hash1.0 b/bin/sh/tests/builtins/hash1.0 index 45cc3003fb59..750fd40cafe5 100644 --- a/bin/sh/tests/builtins/hash1.0 +++ b/bin/sh/tests/builtins/hash1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ cat /dev/null hash hash -r diff --git a/bin/sh/tests/builtins/hash2.0 b/bin/sh/tests/builtins/hash2.0 index e5cd21bc57dd..ec072b93a1a2 100644 --- a/bin/sh/tests/builtins/hash2.0 +++ b/bin/sh/tests/builtins/hash2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ hash hash cat hash diff --git a/bin/sh/tests/builtins/hash3.0 b/bin/sh/tests/builtins/hash3.0 index eade0b319546..3ef33dc4bb3a 100644 --- a/bin/sh/tests/builtins/hash3.0 +++ b/bin/sh/tests/builtins/hash3.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ hash -v cat hash diff --git a/bin/sh/tests/builtins/hash4.0 b/bin/sh/tests/builtins/hash4.0 index dec584c4538f..3e99930bad47 100644 --- a/bin/sh/tests/builtins/hash4.0 +++ b/bin/sh/tests/builtins/hash4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ exec 3>&1 m=`hash nosuchtool 2>&1 >&3` diff --git a/bin/sh/tests/builtins/jobid1.0 b/bin/sh/tests/builtins/jobid1.0 index 483fda20743c..093b2c210778 100644 --- a/bin/sh/tests/builtins/jobid1.0 +++ b/bin/sh/tests/builtins/jobid1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Non-standard builtin. : & diff --git a/bin/sh/tests/builtins/jobid2.0 b/bin/sh/tests/builtins/jobid2.0 index 101831a2e4b8..bf3de17d01cf 100644 --- a/bin/sh/tests/builtins/jobid2.0 +++ b/bin/sh/tests/builtins/jobid2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ : & p1=$(jobid) diff --git a/bin/sh/tests/builtins/kill1.0 b/bin/sh/tests/builtins/kill1.0 index c1b85503848e..85b8b579b3ad 100644 --- a/bin/sh/tests/builtins/kill1.0 +++ b/bin/sh/tests/builtins/kill1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ : & p1=$! diff --git a/bin/sh/tests/builtins/kill2.0 b/bin/sh/tests/builtins/kill2.0 index 31e0ba362b80..13d2a4a896c1 100644 --- a/bin/sh/tests/builtins/kill2.0 +++ b/bin/sh/tests/builtins/kill2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ sleep 1 | sleep 1 & kill %+ diff --git a/bin/sh/tests/builtins/lineno.0 b/bin/sh/tests/builtins/lineno.0 index c9311f82d253..d314eef0f85c 100644 --- a/bin/sh/tests/builtins/lineno.0 +++ b/bin/sh/tests/builtins/lineno.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ echo $LINENO echo $LINENO diff --git a/bin/sh/tests/builtins/lineno.0.stdout b/bin/sh/tests/builtins/lineno.0.stdout index 82583a93c82e..ab5ad9cbef51 100644 --- a/bin/sh/tests/builtins/lineno.0.stdout +++ b/bin/sh/tests/builtins/lineno.0.stdout @@ -1,9 +1,9 @@ +1 2 -3 2 3 +11 12 -13 foo foo 2 diff --git a/bin/sh/tests/builtins/lineno2.0 b/bin/sh/tests/builtins/lineno2.0 index ddbd10433a36..db2a6c8c7b4f 100644 --- a/bin/sh/tests/builtins/lineno2.0 +++ b/bin/sh/tests/builtins/lineno2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { : ${LINENO+${x?}} diff --git a/bin/sh/tests/builtins/lineno3.0 b/bin/sh/tests/builtins/lineno3.0 index eb8f9ab7db94..66ede861dc75 100644 --- a/bin/sh/tests/builtins/lineno3.0 +++ b/bin/sh/tests/builtins/lineno3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ echo before: $LINENO dummy=$'a\0 diff --git a/bin/sh/tests/builtins/lineno3.0.stdout b/bin/sh/tests/builtins/lineno3.0.stdout index 6e0e4ac8ca57..f8b44636cb5d 100644 --- a/bin/sh/tests/builtins/lineno3.0.stdout +++ b/bin/sh/tests/builtins/lineno3.0.stdout @@ -1,2 +1,2 @@ -before: 3 -after: 6 +before: 2 +after: 5 diff --git a/bin/sh/tests/builtins/local1.0 b/bin/sh/tests/builtins/local1.0 index b28837ec005f..e5278d492639 100644 --- a/bin/sh/tests/builtins/local1.0 +++ b/bin/sh/tests/builtins/local1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # A commonly used but non-POSIX builtin. f() { diff --git a/bin/sh/tests/builtins/local2.0 b/bin/sh/tests/builtins/local2.0 index cc8c10f40618..24cef4c1bc3a 100644 --- a/bin/sh/tests/builtins/local2.0 +++ b/bin/sh/tests/builtins/local2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { local - diff --git a/bin/sh/tests/builtins/local3.0 b/bin/sh/tests/builtins/local3.0 index 39ee370099e7..e947b7c495f6 100644 --- a/bin/sh/tests/builtins/local3.0 +++ b/bin/sh/tests/builtins/local3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { local "$@" diff --git a/bin/sh/tests/builtins/local4.0 b/bin/sh/tests/builtins/local4.0 index 3955aaa12f1a..bd5a5765192b 100644 --- a/bin/sh/tests/builtins/local4.0 +++ b/bin/sh/tests/builtins/local4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { local -- x diff --git a/bin/sh/tests/builtins/local5.0 b/bin/sh/tests/builtins/local5.0 index 2f2a14e110ae..82b4014e8e4b 100644 --- a/bin/sh/tests/builtins/local5.0 +++ b/bin/sh/tests/builtins/local5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { local PATH IFS elem diff --git a/bin/sh/tests/builtins/local6.0 b/bin/sh/tests/builtins/local6.0 index 017bb1234c8c..f179fe00f95d 100644 --- a/bin/sh/tests/builtins/local6.0 +++ b/bin/sh/tests/builtins/local6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { local x diff --git a/bin/sh/tests/builtins/local7.0 b/bin/sh/tests/builtins/local7.0 index f7e6fc0aae97..591606d9bd93 100644 --- a/bin/sh/tests/builtins/local7.0 +++ b/bin/sh/tests/builtins/local7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { local x diff --git a/bin/sh/tests/builtins/locale1.0 b/bin/sh/tests/builtins/locale1.0 index 90b10944c5a5..f81dbac4f342 100644 --- a/bin/sh/tests/builtins/locale1.0 +++ b/bin/sh/tests/builtins/locale1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Note: this test depends on strerror() using locale. failures=0 diff --git a/bin/sh/tests/builtins/locale2.0 b/bin/sh/tests/builtins/locale2.0 index 86dd237ff54a..050d7fc9fbfc 100644 --- a/bin/sh/tests/builtins/locale2.0 +++ b/bin/sh/tests/builtins/locale2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ $SH -c 'LC_ALL=C true; kill -INT $$; echo continued' r=$? diff --git a/bin/sh/tests/builtins/printf1.0 b/bin/sh/tests/builtins/printf1.0 index 99a82d014794..1dfbf7a9be4a 100644 --- a/bin/sh/tests/builtins/printf1.0 +++ b/bin/sh/tests/builtins/printf1.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ [ "$(printf '%c\0%s%d' x '\' 010 | tr '\0' Z)" = 'xZ\8' ] diff --git a/bin/sh/tests/builtins/printf2.0 b/bin/sh/tests/builtins/printf2.0 index 7763d6fe9636..8376505c9df5 100644 --- a/bin/sh/tests/builtins/printf2.0 +++ b/bin/sh/tests/builtins/printf2.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ [ "$(printf '%cZ%s%d' x '\' 010)" = 'xZ\8' ] diff --git a/bin/sh/tests/builtins/printf3.0 b/bin/sh/tests/builtins/printf3.0 index 0e7ea85cddb4..b431cc6d3d18 100644 --- a/bin/sh/tests/builtins/printf3.0 +++ b/bin/sh/tests/builtins/printf3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e v=$(! printf "%d" @wrong 2>/dev/null) diff --git a/bin/sh/tests/builtins/printf4.0 b/bin/sh/tests/builtins/printf4.0 index 2dd3e729574a..15d57f782789 100644 --- a/bin/sh/tests/builtins/printf4.0 +++ b/bin/sh/tests/builtins/printf4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e v=$(! printf "%d" 4wrong 2>/dev/null) diff --git a/bin/sh/tests/builtins/read1.0 b/bin/sh/tests/builtins/read1.0 index 06a68faa32a3..b1617c7f48bf 100644 --- a/bin/sh/tests/builtins/read1.0 +++ b/bin/sh/tests/builtins/read1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e echo "1 2 3" | { read a; echo "x${a}x"; } diff --git a/bin/sh/tests/builtins/read2.0 b/bin/sh/tests/builtins/read2.0 index fc7451191586..da7c48553ab0 100644 --- a/bin/sh/tests/builtins/read2.0 +++ b/bin/sh/tests/builtins/read2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e { diff --git a/bin/sh/tests/builtins/read3.0 b/bin/sh/tests/builtins/read3.0 index c6ae9c1023c0..3674ec9f4055 100644 --- a/bin/sh/tests/builtins/read3.0 +++ b/bin/sh/tests/builtins/read3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ printf '%s\n' 'a\ b c' | { read a b; printf '%s\n' "x${a}x${b}x"; } printf '%s\n' 'a b\ c' | { read a b; printf '%s\n' "x${a}x${b}x"; } diff --git a/bin/sh/tests/builtins/read4.0 b/bin/sh/tests/builtins/read4.0 index 7204a35aa0a5..4856feddb5c8 100644 --- a/bin/sh/tests/builtins/read4.0 +++ b/bin/sh/tests/builtins/read4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ printf '%s\n' '\a\ b c' | { read a b; printf '%s\n' "x${a}x${b}x"; } printf '%s\n' '\a b\ c' | { read a b; printf '%s\n' "x${a}x${b}x"; } diff --git a/bin/sh/tests/builtins/read5.0 b/bin/sh/tests/builtins/read5.0 index 7d83391cba22..bbdf246287bd 100644 --- a/bin/sh/tests/builtins/read5.0 +++ b/bin/sh/tests/builtins/read5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ unset LC_ALL LC_CTYPE=en_US.ISO8859-1 diff --git a/bin/sh/tests/builtins/read6.0 b/bin/sh/tests/builtins/read6.0 index 2168e10c841a..60df35f7ee1f 100644 --- a/bin/sh/tests/builtins/read6.0 +++ b/bin/sh/tests/builtins/read6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ : | read x r=$? diff --git a/bin/sh/tests/builtins/read7.0 b/bin/sh/tests/builtins/read7.0 index e78f887b60b4..1e159dca6160 100644 --- a/bin/sh/tests/builtins/read7.0 +++ b/bin/sh/tests/builtins/read7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ { errmsg=`read x <&- 2>&1 >&3`; } 3>&1 r=$? diff --git a/bin/sh/tests/builtins/read8.0 b/bin/sh/tests/builtins/read8.0 index fb786ff008b9..3de0f72c4694 100644 --- a/bin/sh/tests/builtins/read8.0 +++ b/bin/sh/tests/builtins/read8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ read a b c <<\EOF \ diff --git a/bin/sh/tests/builtins/read9.0 b/bin/sh/tests/builtins/read9.0 index 080549889839..23d814934d3c 100644 --- a/bin/sh/tests/builtins/read9.0 +++ b/bin/sh/tests/builtins/read9.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ empty='' read a b c <<EOF diff --git a/bin/sh/tests/builtins/return1.0 b/bin/sh/tests/builtins/return1.0 index 787e892a7698..b3820b4597a8 100644 --- a/bin/sh/tests/builtins/return1.0 +++ b/bin/sh/tests/builtins/return1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { return 0 exit 1 diff --git a/bin/sh/tests/builtins/return2.1 b/bin/sh/tests/builtins/return2.1 index 0ef817179d73..8cd5ca58a42d 100644 --- a/bin/sh/tests/builtins/return2.1 +++ b/bin/sh/tests/builtins/return2.1 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { true && return 1 return 0 diff --git a/bin/sh/tests/builtins/return3.1 b/bin/sh/tests/builtins/return3.1 index 605ec680d66a..e871c055afce 100644 --- a/bin/sh/tests/builtins/return3.1 +++ b/bin/sh/tests/builtins/return3.1 @@ -1,3 +1,2 @@ -# $FreeBSD$ return 1 exit 0 diff --git a/bin/sh/tests/builtins/return4.0 b/bin/sh/tests/builtins/return4.0 index be5582b458b4..a2edab53c222 100644 --- a/bin/sh/tests/builtins/return4.0 +++ b/bin/sh/tests/builtins/return4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/return5.0 b/bin/sh/tests/builtins/return5.0 index 6e4b7bd751a8..46243b6b20c6 100644 --- a/bin/sh/tests/builtins/return5.0 +++ b/bin/sh/tests/builtins/return5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ if [ "$1" != nested ]; then f() { diff --git a/bin/sh/tests/builtins/return6.4 b/bin/sh/tests/builtins/return6.4 index e4d8e0d641a1..172459f40c68 100644 --- a/bin/sh/tests/builtins/return6.4 +++ b/bin/sh/tests/builtins/return6.4 @@ -1,3 +1,2 @@ -# $FreeBSD$ while return 4; do exit 3; done diff --git a/bin/sh/tests/builtins/return7.4 b/bin/sh/tests/builtins/return7.4 index 2047373473ab..9f914d70e928 100644 --- a/bin/sh/tests/builtins/return7.4 +++ b/bin/sh/tests/builtins/return7.4 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { while return 4; do exit 3; done diff --git a/bin/sh/tests/builtins/return8.0 b/bin/sh/tests/builtins/return8.0 index f00e859a74ce..c9f5b0a03c2f 100644 --- a/bin/sh/tests/builtins/return8.0 +++ b/bin/sh/tests/builtins/return8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ if [ "$1" = nested ]; then return 17 diff --git a/bin/sh/tests/builtins/set1.0 b/bin/sh/tests/builtins/set1.0 index fc39fade6270..3f311fc0287d 100644 --- a/bin/sh/tests/builtins/set1.0 +++ b/bin/sh/tests/builtins/set1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set +C set +f diff --git a/bin/sh/tests/builtins/set2.0 b/bin/sh/tests/builtins/set2.0 index ad13eab0a7b8..f959cf797fe2 100644 --- a/bin/sh/tests/builtins/set2.0 +++ b/bin/sh/tests/builtins/set2.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ ! env @badness=1 ${SH} -c 'v=`set`; eval "$v"' 2>&1 | grep @badness diff --git a/bin/sh/tests/builtins/set3.0 b/bin/sh/tests/builtins/set3.0 index c5536e96b7a1..44255adc4bda 100644 --- a/bin/sh/tests/builtins/set3.0 +++ b/bin/sh/tests/builtins/set3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ settings1=$(set +o) && set -o nolog && settings2=$(set +o) && [ "$settings1" != "$settings2" ] diff --git a/bin/sh/tests/builtins/trap1.0 b/bin/sh/tests/builtins/trap1.0 index 313f6a387678..7f39faba319a 100644 --- a/bin/sh/tests/builtins/trap1.0 +++ b/bin/sh/tests/builtins/trap1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ test "$(trap 'echo trapped' EXIT; :)" = trapped || exit 1 diff --git a/bin/sh/tests/builtins/trap10.0 b/bin/sh/tests/builtins/trap10.0 index fa0e35d6a6b2..96baa6532224 100644 --- a/bin/sh/tests/builtins/trap10.0 +++ b/bin/sh/tests/builtins/trap10.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Check that the return statement will not break the EXIT trap, ie. all # trap commands are executed before the script exits. diff --git a/bin/sh/tests/builtins/trap11.0 b/bin/sh/tests/builtins/trap11.0 index cfeea9ed9ded..354698d90ea3 100644 --- a/bin/sh/tests/builtins/trap11.0 +++ b/bin/sh/tests/builtins/trap11.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Check that the return statement will not break the USR1 trap, ie. all # trap commands are executed before the script resumes. diff --git a/bin/sh/tests/builtins/trap12.0 b/bin/sh/tests/builtins/trap12.0 index 8c62ffd2b570..87592af250ad 100644 --- a/bin/sh/tests/builtins/trap12.0 +++ b/bin/sh/tests/builtins/trap12.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ f() { trap 'return 42' USR1 diff --git a/bin/sh/tests/builtins/trap13.0 b/bin/sh/tests/builtins/trap13.0 index d90eb08eb242..81db991a4978 100644 --- a/bin/sh/tests/builtins/trap13.0 +++ b/bin/sh/tests/builtins/trap13.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ { trap 'exit 0' INT diff --git a/bin/sh/tests/builtins/trap14.0 b/bin/sh/tests/builtins/trap14.0 index 97cce8d0d244..cf22b15b4677 100644 --- a/bin/sh/tests/builtins/trap14.0 +++ b/bin/sh/tests/builtins/trap14.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ { trap - INT diff --git a/bin/sh/tests/builtins/trap15.0 b/bin/sh/tests/builtins/trap15.0 index 6b9857df3d1a..a7e8d6475f10 100644 --- a/bin/sh/tests/builtins/trap15.0 +++ b/bin/sh/tests/builtins/trap15.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ (${SH} -c 'term(){ exit 5;}; trap term TERM; kill -TERM $$') & wait >/dev/null 2>&1 $! diff --git a/bin/sh/tests/builtins/trap16.0 b/bin/sh/tests/builtins/trap16.0 index 3d70cce8a721..23c615ab41e3 100644 --- a/bin/sh/tests/builtins/trap16.0 +++ b/bin/sh/tests/builtins/trap16.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ traps=$(${SH} -c 'trap "echo bad" 0; trap - 0; trap') [ -z "$traps" ] || exit 1 diff --git a/bin/sh/tests/builtins/trap17.0 b/bin/sh/tests/builtins/trap17.0 index 89be893edd1a..580c41fc2498 100644 --- a/bin/sh/tests/builtins/trap17.0 +++ b/bin/sh/tests/builtins/trap17.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # This use-after-free bug probably needs non-default settings to show up. v1=nothing v2=nothing diff --git a/bin/sh/tests/builtins/trap2.0 b/bin/sh/tests/builtins/trap2.0 index a05287a16771..d2ea0599940b 100644 --- a/bin/sh/tests/builtins/trap2.0 +++ b/bin/sh/tests/builtins/trap2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # This is really a test for outqstr(), which is readily accessible via trap. runtest() diff --git a/bin/sh/tests/builtins/trap3.0 b/bin/sh/tests/builtins/trap3.0 index 81607293531e..5f6bd73654ec 100644 --- a/bin/sh/tests/builtins/trap3.0 +++ b/bin/sh/tests/builtins/trap3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ { trap '' garbage && exit 3 diff --git a/bin/sh/tests/builtins/trap4.0 b/bin/sh/tests/builtins/trap4.0 index 7f2080ee4dca..52ca5c777381 100644 --- a/bin/sh/tests/builtins/trap4.0 +++ b/bin/sh/tests/builtins/trap4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ T=$(mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX) trap 'rm -rf $T' 0 diff --git a/bin/sh/tests/builtins/trap5.0 b/bin/sh/tests/builtins/trap5.0 index 56e0fb1b89fe..7dd9bffa1f96 100644 --- a/bin/sh/tests/builtins/trap5.0 +++ b/bin/sh/tests/builtins/trap5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e trap - USR1 diff --git a/bin/sh/tests/builtins/trap6.0 b/bin/sh/tests/builtins/trap6.0 index bd2bf7efe769..aca7e4c633d0 100644 --- a/bin/sh/tests/builtins/trap6.0 +++ b/bin/sh/tests/builtins/trap6.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ v=$( ${SH} -c 'trap "echo ok; exit" USR1; kill -USR1 $$' & diff --git a/bin/sh/tests/builtins/trap7.0 b/bin/sh/tests/builtins/trap7.0 index 35529b80f4bf..0f208551017b 100644 --- a/bin/sh/tests/builtins/trap7.0 +++ b/bin/sh/tests/builtins/trap7.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ [ "$(trap 'echo trapped' EXIT)" = trapped ] diff --git a/bin/sh/tests/builtins/trap8.0 b/bin/sh/tests/builtins/trap8.0 index cdce976e36da..b04f53079e9d 100644 --- a/bin/sh/tests/builtins/trap8.0 +++ b/bin/sh/tests/builtins/trap8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # I am not sure if POSIX requires the shell to continue processing # further trap names in the same trap command after an invalid one. diff --git a/bin/sh/tests/builtins/trap9.0 b/bin/sh/tests/builtins/trap9.0 index 0f584ecec584..187249bf7ed0 100644 --- a/bin/sh/tests/builtins/trap9.0 +++ b/bin/sh/tests/builtins/trap9.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ test "$(trap 'printf trap; echo ped' EXIT; f() { :; }; f)" = trapped || exit 1 diff --git a/bin/sh/tests/builtins/type1.0 b/bin/sh/tests/builtins/type1.0 index c5e456437946..35c9f7bed236 100644 --- a/bin/sh/tests/builtins/type1.0 +++ b/bin/sh/tests/builtins/type1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ command -v not-here && exit 1 command -v /not-here && exit 1 command -V not-here && exit 1 diff --git a/bin/sh/tests/builtins/type2.0 b/bin/sh/tests/builtins/type2.0 index fe44d957fc0a..79b912a52070 100644 --- a/bin/sh/tests/builtins/type2.0 +++ b/bin/sh/tests/builtins/type2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures=0 diff --git a/bin/sh/tests/builtins/type3.0 b/bin/sh/tests/builtins/type3.0 index 87cccdd812cc..ccca26b2d741 100644 --- a/bin/sh/tests/builtins/type3.0 +++ b/bin/sh/tests/builtins/type3.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ [ "$(type type)" = "$(type -- type)" ] diff --git a/bin/sh/tests/builtins/type4.0 b/bin/sh/tests/builtins/type4.0 index 5b5f96c5078d..570c67d52cd7 100644 --- a/bin/sh/tests/builtins/type4.0 +++ b/bin/sh/tests/builtins/type4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ r=`cd /bin && PATH=. type ls` case $r in diff --git a/bin/sh/tests/builtins/unalias.0 b/bin/sh/tests/builtins/unalias.0 index 34d8d6e07d2e..3e5ae88e5432 100644 --- a/bin/sh/tests/builtins/unalias.0 +++ b/bin/sh/tests/builtins/unalias.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ set -e alias false=true diff --git a/bin/sh/tests/builtins/var-assign.0 b/bin/sh/tests/builtins/var-assign.0 index efeb4bd130ac..06b13875e6ae 100644 --- a/bin/sh/tests/builtins/var-assign.0 +++ b/bin/sh/tests/builtins/var-assign.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ IFS=, SPECIAL="break,\ diff --git a/bin/sh/tests/builtins/var-assign2.0 b/bin/sh/tests/builtins/var-assign2.0 index eafec89a681b..e8b14d3832b4 100644 --- a/bin/sh/tests/builtins/var-assign2.0 +++ b/bin/sh/tests/builtins/var-assign2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ IFS=, SPECIAL="break,\ diff --git a/bin/sh/tests/builtins/wait1.0 b/bin/sh/tests/builtins/wait1.0 index 1ca85308c9ac..8bd48fefde25 100644 --- a/bin/sh/tests/builtins/wait1.0 +++ b/bin/sh/tests/builtins/wait1.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/wait10.0 b/bin/sh/tests/builtins/wait10.0 index 864fc7817276..e45d08727205 100644 --- a/bin/sh/tests/builtins/wait10.0 +++ b/bin/sh/tests/builtins/wait10.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ # Init cannot be a child of the shell. exit 49 & p49=$! wait 1 "$p49" diff --git a/bin/sh/tests/builtins/wait2.0 b/bin/sh/tests/builtins/wait2.0 index e61455cf5f0e..97632575213b 100644 --- a/bin/sh/tests/builtins/wait2.0 +++ b/bin/sh/tests/builtins/wait2.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/wait3.0 b/bin/sh/tests/builtins/wait3.0 index 1ed52999630d..4b62c1b897b6 100644 --- a/bin/sh/tests/builtins/wait3.0 +++ b/bin/sh/tests/builtins/wait3.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ failures= failure() { diff --git a/bin/sh/tests/builtins/wait4.0 b/bin/sh/tests/builtins/wait4.0 index 79351315d384..972a27e3c3d4 100644 --- a/bin/sh/tests/builtins/wait4.0 +++ b/bin/sh/tests/builtins/wait4.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX` trap 'rm -rf $T' 0 diff --git a/bin/sh/tests/builtins/wait5.0 b/bin/sh/tests/builtins/wait5.0 index 6874bf669302..71ecbe51639c 100644 --- a/bin/sh/tests/builtins/wait5.0 +++ b/bin/sh/tests/builtins/wait5.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXX` trap 'rm -rf $T' 0 diff --git a/bin/sh/tests/builtins/wait6.0 b/bin/sh/tests/builtins/wait6.0 index 20e3c6808679..757fee5ce5cf 100644 --- a/bin/sh/tests/builtins/wait6.0 +++ b/bin/sh/tests/builtins/wait6.0 @@ -1,3 +1,2 @@ -# $FreeBSD$ wait -- diff --git a/bin/sh/tests/builtins/wait7.0 b/bin/sh/tests/builtins/wait7.0 index 0fb092f8f614..db535e1c40d1 100644 --- a/bin/sh/tests/builtins/wait7.0 +++ b/bin/sh/tests/builtins/wait7.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ : & wait -- $! diff --git a/bin/sh/tests/builtins/wait8.0 b/bin/sh/tests/builtins/wait8.0 index b59ff59622eb..3f6cdc72abc7 100644 --- a/bin/sh/tests/builtins/wait8.0 +++ b/bin/sh/tests/builtins/wait8.0 @@ -1,4 +1,3 @@ -# $FreeBSD$ exit 44 & p44=$! exit 45 & p45=$! diff --git a/bin/sh/tests/builtins/wait9.127 b/bin/sh/tests/builtins/wait9.127 index 661f275421f8..676973dc97dd 100644 --- a/bin/sh/tests/builtins/wait9.127 +++ b/bin/sh/tests/builtins/wait9.127 @@ -1,3 +1,2 @@ -# $FreeBSD$ # Init cannot be a child of the shell. wait 1 |