summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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