diff options
author | 2013-06-09 13:27:27 +0000 | |
---|---|---|
committer | 2013-06-09 13:27:27 +0000 | |
commit | cf64594724a59a0e23dcc42e022ca4446ec069b0 (patch) | |
tree | bb5b5b5929c84ab3751793102e7805d0e9843edf | |
parent | arguments to bcopy/memmove are reversed. put on thinking cap, then commit. (diff) | |
download | wireguard-openbsd-cf64594724a59a0e23dcc42e022ca4446ec069b0.tar.xz wireguard-openbsd-cf64594724a59a0e23dcc42e022ca4446ec069b0.zip |
Add test for "true && true && false" and "set -e".
-rw-r--r-- | regress/bin/ksh/Makefile | 10 | ||||
-rw-r--r-- | regress/bin/ksh/eval4.sh | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/regress/bin/ksh/Makefile b/regress/bin/ksh/Makefile index 24ef667611f..58414361a14 100644 --- a/regress/bin/ksh/Makefile +++ b/regress/bin/ksh/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.6 2013/06/07 08:48:18 espie Exp $ +# $OpenBSD: Makefile,v 1.7 2013/06/09 13:27:27 millert Exp $ -REGRESS_TARGETS=shcrash.sh seterror.sh varfunction.sh eval.sh eval2.sh eval3.sh +REGRESS_TARGETS=shcrash.sh seterror.sh varfunction.sh eval.sh eval2.sh eval3.sh eval4.sh shcrash.sh: ulimit -c 0 && sh ${.CURDIR}/shcrash.sh @@ -26,6 +26,12 @@ eval3.sh: # and it should return an error if ! sh ${.CURDIR}/eval3.sh >/dev/null; then true; else false; fi +eval4.sh: + # this should not print + test `sh ${.CURDIR}/eval4.sh|wc -c` == 0 + # and it should return an error + if ! sh ${.CURDIR}/eval4.sh >/dev/null; then true; else false; fi + .PHONY: ${REGRESS_TARGETS} .include <bsd.regress.mk> diff --git a/regress/bin/ksh/eval4.sh b/regress/bin/ksh/eval4.sh new file mode 100644 index 00000000000..4299193a641 --- /dev/null +++ b/regress/bin/ksh/eval4.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# $OpenBSD: eval4.sh,v 1.1 2013/06/09 13:27:27 millert Exp $ + +set -e +true && true && false +echo "should not print" |