diff options
-rw-r--r-- | tools/regression/bin/sh/builtins/hash1.0 | 5 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/hash1.0.stdout | 1 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/hash2.0 | 4 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/hash2.0.stdout | 1 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/hash3.0 | 3 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/hash3.0.stdout | 2 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/return1.0 | 7 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/return2.1 | 7 | ||||
-rw-r--r-- | tools/regression/bin/sh/builtins/return3.1 | 3 | ||||
-rw-r--r-- | tools/regression/bin/sh/regress.sh | 13 | ||||
-rw-r--r-- | tools/regression/bin/sh/set-e/for1.0 | 9 | ||||
-rw-r--r-- | tools/regression/bin/sh/set-e/func1.0 | 7 | ||||
-rw-r--r-- | tools/regression/bin/sh/set-e/func2.1 | 7 | ||||
-rw-r--r-- | tools/regression/bin/sh/set-e/until3.0 | 9 | ||||
-rw-r--r-- | tools/regression/bin/sh/set-e/while3.0 | 9 |
15 files changed, 78 insertions, 9 deletions
diff --git a/tools/regression/bin/sh/builtins/hash1.0 b/tools/regression/bin/sh/builtins/hash1.0 new file mode 100644 index 0000000..45cc300 --- /dev/null +++ b/tools/regression/bin/sh/builtins/hash1.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ +cat /dev/null +hash +hash -r +hash diff --git a/tools/regression/bin/sh/builtins/hash1.0.stdout b/tools/regression/bin/sh/builtins/hash1.0.stdout new file mode 100644 index 0000000..3afc3e7 --- /dev/null +++ b/tools/regression/bin/sh/builtins/hash1.0.stdout @@ -0,0 +1 @@ +/bin/cat diff --git a/tools/regression/bin/sh/builtins/hash2.0 b/tools/regression/bin/sh/builtins/hash2.0 new file mode 100644 index 0000000..e5cd21b --- /dev/null +++ b/tools/regression/bin/sh/builtins/hash2.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +hash +hash cat +hash diff --git a/tools/regression/bin/sh/builtins/hash2.0.stdout b/tools/regression/bin/sh/builtins/hash2.0.stdout new file mode 100644 index 0000000..3afc3e7 --- /dev/null +++ b/tools/regression/bin/sh/builtins/hash2.0.stdout @@ -0,0 +1 @@ +/bin/cat diff --git a/tools/regression/bin/sh/builtins/hash3.0 b/tools/regression/bin/sh/builtins/hash3.0 new file mode 100644 index 0000000..eade0b3 --- /dev/null +++ b/tools/regression/bin/sh/builtins/hash3.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +hash -v cat +hash diff --git a/tools/regression/bin/sh/builtins/hash3.0.stdout b/tools/regression/bin/sh/builtins/hash3.0.stdout new file mode 100644 index 0000000..a34864c --- /dev/null +++ b/tools/regression/bin/sh/builtins/hash3.0.stdout @@ -0,0 +1,2 @@ +/bin/cat +/bin/cat diff --git a/tools/regression/bin/sh/builtins/return1.0 b/tools/regression/bin/sh/builtins/return1.0 new file mode 100644 index 0000000..787e892 --- /dev/null +++ b/tools/regression/bin/sh/builtins/return1.0 @@ -0,0 +1,7 @@ +# $FreeBSD$ +f() { + return 0 + exit 1 +} + +f diff --git a/tools/regression/bin/sh/builtins/return2.1 b/tools/regression/bin/sh/builtins/return2.1 new file mode 100644 index 0000000..0ef8171 --- /dev/null +++ b/tools/regression/bin/sh/builtins/return2.1 @@ -0,0 +1,7 @@ +# $FreeBSD$ +f() { + true && return 1 + return 0 +} + +f diff --git a/tools/regression/bin/sh/builtins/return3.1 b/tools/regression/bin/sh/builtins/return3.1 new file mode 100644 index 0000000..605ec68 --- /dev/null +++ b/tools/regression/bin/sh/builtins/return3.1 @@ -0,0 +1,3 @@ +# $FreeBSD$ +return 1 +exit 0 diff --git a/tools/regression/bin/sh/regress.sh b/tools/regression/bin/sh/regress.sh index 0e098d0..e2767d7 100644 --- a/tools/regression/bin/sh/regress.sh +++ b/tools/regression/bin/sh/regress.sh @@ -1,6 +1,6 @@ # $FreeBSD$ -echo '1..31' +echo '1..42' COUNTER=1 @@ -31,12 +31,7 @@ do_test() { rm tmp.stdout tmp.stderr } -SUCCESS=$(find . -name "*.0") -for i in ${SUCCESS} ; do - do_test ${i} 0 -done - -FAILURE=$(find . -name "*.1") -for i in ${FAILURE} ; do - do_test ${i} 1 +TESTS=$(find -s . -name "*.[01]") +for i in ${TESTS} ; do + do_test ${i} ${i##*.} done diff --git a/tools/regression/bin/sh/set-e/for1.0 b/tools/regression/bin/sh/set-e/for1.0 new file mode 100644 index 0000000..67eb718 --- /dev/null +++ b/tools/regression/bin/sh/set-e/for1.0 @@ -0,0 +1,9 @@ +# $FreeBSD$ +set -e +f() { + for i in a b c; do + false + true + done +} +f || true diff --git a/tools/regression/bin/sh/set-e/func1.0 b/tools/regression/bin/sh/set-e/func1.0 new file mode 100644 index 0000000..3c6b704 --- /dev/null +++ b/tools/regression/bin/sh/set-e/func1.0 @@ -0,0 +1,7 @@ +# $FreeBSD$ +set -e +f() { + false + true +} +f || true diff --git a/tools/regression/bin/sh/set-e/func2.1 b/tools/regression/bin/sh/set-e/func2.1 new file mode 100644 index 0000000..cc76d6e --- /dev/null +++ b/tools/regression/bin/sh/set-e/func2.1 @@ -0,0 +1,7 @@ +# $FreeBSD$ +set -e +f() { + false + exit 0 +} +f diff --git a/tools/regression/bin/sh/set-e/until3.0 b/tools/regression/bin/sh/set-e/until3.0 new file mode 100644 index 0000000..597db59 --- /dev/null +++ b/tools/regression/bin/sh/set-e/until3.0 @@ -0,0 +1,9 @@ +# $FreeBSD$ +set -e +f() { + until false; do + false + break + done +} +f || true diff --git a/tools/regression/bin/sh/set-e/while3.0 b/tools/regression/bin/sh/set-e/while3.0 new file mode 100644 index 0000000..dd3c790 --- /dev/null +++ b/tools/regression/bin/sh/set-e/while3.0 @@ -0,0 +1,9 @@ +# $FreeBSD$ +set -e +f() { + while true; do + false + break + done +} +f || true |