diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-09-04 11:59:59 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-09-04 11:59:59 +0000 |
commit | ce5d9c9b6dd571b4283b6061ea0da0c36d2f5488 (patch) | |
tree | de352b66017836f6f51a79fbc4034ba9f690bfe6 /tools/regression/bin/sh/set-e | |
parent | 4f6bd877d34f81ed26acdfccfef79093b1042995 (diff) | |
download | FreeBSD-src-ce5d9c9b6dd571b4283b6061ea0da0c36d2f5488.zip FreeBSD-src-ce5d9c9b6dd571b4283b6061ea0da0c36d2f5488.tar.gz |
Add a couple of regression tests for /bin/sh.
Diffstat (limited to 'tools/regression/bin/sh/set-e')
28 files changed, 118 insertions, 0 deletions
diff --git a/tools/regression/bin/sh/set-e/and1.0 b/tools/regression/bin/sh/set-e/and1.0 new file mode 100644 index 0000000..607b7c3 --- /dev/null +++ b/tools/regression/bin/sh/set-e/and1.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +true && true diff --git a/tools/regression/bin/sh/set-e/and2.1 b/tools/regression/bin/sh/set-e/and2.1 new file mode 100644 index 0000000..78e203a --- /dev/null +++ b/tools/regression/bin/sh/set-e/and2.1 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +true && false +exit 0 diff --git a/tools/regression/bin/sh/set-e/and3.0 b/tools/regression/bin/sh/set-e/and3.0 new file mode 100644 index 0000000..9fafb1c --- /dev/null +++ b/tools/regression/bin/sh/set-e/and3.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +false && true +exit 0 diff --git a/tools/regression/bin/sh/set-e/and4.0 b/tools/regression/bin/sh/set-e/and4.0 new file mode 100644 index 0000000..25d0e61 --- /dev/null +++ b/tools/regression/bin/sh/set-e/and4.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +false && false +exit 0 diff --git a/tools/regression/bin/sh/set-e/background1.0 b/tools/regression/bin/sh/set-e/background1.0 new file mode 100644 index 0000000..21577f4 --- /dev/null +++ b/tools/regression/bin/sh/set-e/background1.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +false & diff --git a/tools/regression/bin/sh/set-e/cmd1.0 b/tools/regression/bin/sh/set-e/cmd1.0 new file mode 100644 index 0000000..67fdcbc --- /dev/null +++ b/tools/regression/bin/sh/set-e/cmd1.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +true diff --git a/tools/regression/bin/sh/set-e/cmd2.1 b/tools/regression/bin/sh/set-e/cmd2.1 new file mode 100644 index 0000000..7cd8b09 --- /dev/null +++ b/tools/regression/bin/sh/set-e/cmd2.1 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +false +exit 0 diff --git a/tools/regression/bin/sh/set-e/elif1.0 b/tools/regression/bin/sh/set-e/elif1.0 new file mode 100644 index 0000000..80c7af6 --- /dev/null +++ b/tools/regression/bin/sh/set-e/elif1.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ +set -e +if false; then +elif false; then +fi diff --git a/tools/regression/bin/sh/set-e/elif2.0 b/tools/regression/bin/sh/set-e/elif2.0 new file mode 100644 index 0000000..028938b --- /dev/null +++ b/tools/regression/bin/sh/set-e/elif2.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ +set -e +if false; then +elif false; false; then +fi diff --git a/tools/regression/bin/sh/set-e/if1.0 b/tools/regression/bin/sh/set-e/if1.0 new file mode 100644 index 0000000..0be254b --- /dev/null +++ b/tools/regression/bin/sh/set-e/if1.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +if false; then +fi diff --git a/tools/regression/bin/sh/set-e/if2.0 b/tools/regression/bin/sh/set-e/if2.0 new file mode 100644 index 0000000..4955408 --- /dev/null +++ b/tools/regression/bin/sh/set-e/if2.0 @@ -0,0 +1,7 @@ +# $FreeBSD$ +set -e +# PR 28852 +if true; then + false && true +fi +exit 0 diff --git a/tools/regression/bin/sh/set-e/if3.0 b/tools/regression/bin/sh/set-e/if3.0 new file mode 100644 index 0000000..fdeacc0 --- /dev/null +++ b/tools/regression/bin/sh/set-e/if3.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +if false; false then +fi diff --git a/tools/regression/bin/sh/set-e/not1.0 b/tools/regression/bin/sh/set-e/not1.0 new file mode 100644 index 0000000..21c089a --- /dev/null +++ b/tools/regression/bin/sh/set-e/not1.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +! true +exit 0 diff --git a/tools/regression/bin/sh/set-e/not2.0 b/tools/regression/bin/sh/set-e/not2.0 new file mode 100644 index 0000000..59b9c1c --- /dev/null +++ b/tools/regression/bin/sh/set-e/not2.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +! false diff --git a/tools/regression/bin/sh/set-e/or1.0 b/tools/regression/bin/sh/set-e/or1.0 new file mode 100644 index 0000000..c2dcbe9 --- /dev/null +++ b/tools/regression/bin/sh/set-e/or1.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +true || false diff --git a/tools/regression/bin/sh/set-e/or2.0 b/tools/regression/bin/sh/set-e/or2.0 new file mode 100644 index 0000000..934e2a6 --- /dev/null +++ b/tools/regression/bin/sh/set-e/or2.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +false || true diff --git a/tools/regression/bin/sh/set-e/or3.1 b/tools/regression/bin/sh/set-e/or3.1 new file mode 100644 index 0000000..7a617a1 --- /dev/null +++ b/tools/regression/bin/sh/set-e/or3.1 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +false || false +exit 0 diff --git a/tools/regression/bin/sh/set-e/pipe1.1 b/tools/regression/bin/sh/set-e/pipe1.1 new file mode 100644 index 0000000..c0bad0f --- /dev/null +++ b/tools/regression/bin/sh/set-e/pipe1.1 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +true | false +exit 0 diff --git a/tools/regression/bin/sh/set-e/pipe2.0 b/tools/regression/bin/sh/set-e/pipe2.0 new file mode 100644 index 0000000..1e25566 --- /dev/null +++ b/tools/regression/bin/sh/set-e/pipe2.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +false | true diff --git a/tools/regression/bin/sh/set-e/return1.0 b/tools/regression/bin/sh/set-e/return1.0 new file mode 100644 index 0000000..ff20a07 --- /dev/null +++ b/tools/regression/bin/sh/set-e/return1.0 @@ -0,0 +1,11 @@ +# $FreeBSD$ +set -e + +# PR 85267 +f() { + false || return 1 + return 0 +} + +f || true +exit 0 diff --git a/tools/regression/bin/sh/set-e/semi1.1 b/tools/regression/bin/sh/set-e/semi1.1 new file mode 100644 index 0000000..90476a9 --- /dev/null +++ b/tools/regression/bin/sh/set-e/semi1.1 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +false; true +exit 0 diff --git a/tools/regression/bin/sh/set-e/semi2.1 b/tools/regression/bin/sh/set-e/semi2.1 new file mode 100644 index 0000000..8f510ac --- /dev/null +++ b/tools/regression/bin/sh/set-e/semi2.1 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +true; false +exit 0 diff --git a/tools/regression/bin/sh/set-e/subshell1.0 b/tools/regression/bin/sh/set-e/subshell1.0 new file mode 100644 index 0000000..8e5831b --- /dev/null +++ b/tools/regression/bin/sh/set-e/subshell1.0 @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +(true) diff --git a/tools/regression/bin/sh/set-e/subshell2.1 b/tools/regression/bin/sh/set-e/subshell2.1 new file mode 100644 index 0000000..619e98a --- /dev/null +++ b/tools/regression/bin/sh/set-e/subshell2.1 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +(false) +exit 0 diff --git a/tools/regression/bin/sh/set-e/until1.0 b/tools/regression/bin/sh/set-e/until1.0 new file mode 100644 index 0000000..71ea7f2 --- /dev/null +++ b/tools/regression/bin/sh/set-e/until1.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ +set -e +until false; do + break +done diff --git a/tools/regression/bin/sh/set-e/until2.0 b/tools/regression/bin/sh/set-e/until2.0 new file mode 100644 index 0000000..24ea276 --- /dev/null +++ b/tools/regression/bin/sh/set-e/until2.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ +set -e +until false; false; do + break +done diff --git a/tools/regression/bin/sh/set-e/while1.0 b/tools/regression/bin/sh/set-e/while1.0 new file mode 100644 index 0000000..e4c8938 --- /dev/null +++ b/tools/regression/bin/sh/set-e/while1.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +while false; do +done diff --git a/tools/regression/bin/sh/set-e/while2.0 b/tools/regression/bin/sh/set-e/while2.0 new file mode 100644 index 0000000..a331237 --- /dev/null +++ b/tools/regression/bin/sh/set-e/while2.0 @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +while false; false; do +done |