summaryrefslogtreecommitdiff
path: root/regress/bin
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2010-03-24 08:29:45 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2010-03-24 08:29:45 +0000
commit9e2938766037b0b0a5f49d5777621619a5900d89 (patch)
tree949299d74770de8de89b63e22fd31972a815fc11 /regress/bin
parent0c8da1c3b558f9827d593d92a726f582642d3279 (diff)
tests for ${name#pat} and ${name%pat} issue.
millert@ ok'd a previous version.
Diffstat (limited to 'regress/bin')
-rw-r--r--regress/bin/ksh/Makefile7
-rw-r--r--regress/bin/ksh/eval.sh15
2 files changed, 20 insertions, 2 deletions
diff --git a/regress/bin/ksh/Makefile b/regress/bin/ksh/Makefile
index 25e141b061a..ae966f67b2c 100644
--- a/regress/bin/ksh/Makefile
+++ b/regress/bin/ksh/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2003/12/15 05:28:40 otto Exp $
+# $OpenBSD: Makefile,v 1.5 2010/03/24 08:29:44 fgsch Exp $
-REGRESS_TARGETS=shcrash.sh seterror.sh varfunction.sh
+REGRESS_TARGETS=shcrash.sh seterror.sh varfunction.sh eval.sh
shcrash.sh:
ulimit -c 0 && sh ${.CURDIR}/shcrash.sh
@@ -11,6 +11,9 @@ seterror.sh:
varfunction.sh:
sh ${.CURDIR}/varfunction.sh
+eval.sh:
+ test `sh ${.CURDIR}/eval.sh | wc -l` == 4
+
.PHONY: ${REGRESS_TARGETS}
.include <bsd.regress.mk>
diff --git a/regress/bin/ksh/eval.sh b/regress/bin/ksh/eval.sh
new file mode 100644
index 00000000000..fb6d01f281b
--- /dev/null
+++ b/regress/bin/ksh/eval.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# $Id: eval.sh,v 1.1 2010/03/24 08:29:44 fgsch Exp $
+
+for n in ${a#*=}; do echo ${n}; done
+for n in "${a#*=}"; do echo ${n}; done
+
+for n in ${a##*=}; do echo ${n}; done
+for n in "${a##*=}"; do echo ${n}; done
+
+for n in ${a%=*}; do echo ${n}; done
+for n in "${a%=*}"; do echo ${n}; done
+
+for n in ${a%%=*}; do echo ${n}; done
+for n in "${a%%=*}"; do echo ${n}; done