summaryrefslogtreecommitdiff
path: root/regress/bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2003-02-09 18:52:50 +0000
committerMarc Espie <espie@cvs.openbsd.org>2003-02-09 18:52:50 +0000
commit490e540fab0486164bf17ed459af0fd894715c5b (patch)
treeef1f6aba2df801f06de23b2ed7718537a38ca466 /regress/bin
parent329a3c21094f6145cab176e175eeaa8f48d42b99 (diff)
a common construct that ksh fails.
Diffstat (limited to 'regress/bin')
-rw-r--r--regress/bin/ksh/Makefile7
-rw-r--r--regress/bin/ksh/seterror.sh13
2 files changed, 18 insertions, 2 deletions
diff --git a/regress/bin/ksh/Makefile b/regress/bin/ksh/Makefile
index d25f066e237..f493d21acca 100644
--- a/regress/bin/ksh/Makefile
+++ b/regress/bin/ksh/Makefile
@@ -1,10 +1,13 @@
-# $OpenBSD: Makefile,v 1.2 2002/09/02 20:01:43 avsm Exp $
+# $OpenBSD: Makefile,v 1.3 2003/02/09 18:52:49 espie Exp $
-REGRESS_TARGETS=shcrash.sh
+REGRESS_TARGETS=shcrash.sh seterror.sh
shcrash.sh:
ulimit -c 0 && sh ${.CURDIR}/shcrash.sh
+seterror.sh:
+ sh ${.CURDIR}/seterror.sh
+
.PHONY: ${REGRESS_TARGETS}
.include <bsd.regress.mk>
diff --git a/regress/bin/ksh/seterror.sh b/regress/bin/ksh/seterror.sh
new file mode 100644
index 00000000000..c7001e254c5
--- /dev/null
+++ b/regress/bin/ksh/seterror.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+# $OpenBSD: seterror.sh,v 1.1 2003/02/09 18:52:49 espie Exp $
+
+# set -e is supposed to abort the script for errors that are not caught
+# otherwise.
+
+set -e
+
+for i in 1 2 3
+do
+ false && true
+done
+true