diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-09-05 09:42:10 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-09-05 09:42:10 +0000 |
commit | 560cfe4de3e63e664fc297f927e761d8e62afbbb (patch) | |
tree | 00a3adcc5b6525f24fde4ca1fd4dfcb2c4741709 /tools/regression/bin/sh/set-e | |
parent | 549c6812a94339302b34e899ce15d452ed69ef23 (diff) | |
download | FreeBSD-src-560cfe4de3e63e664fc297f927e761d8e62afbbb.zip FreeBSD-src-560cfe4de3e63e664fc297f927e761d8e62afbbb.tar.gz |
- Add tests for hash and return and more tests for set -e.
- Simplify regress.sh, sort tests.
Diffstat (limited to 'tools/regression/bin/sh/set-e')
-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 |
5 files changed, 41 insertions, 0 deletions
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 |