aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorGravatar Ron Yorston <rmy@pobox.com>2015-10-29 11:29:59 +0000
committerGravatar Mike Frysinger <vapier@gentoo.org>2016-03-22 18:21:06 -0400
commit4c07ad913029c20d845cbb3d9ff80d6332835ae1 (patch)
tree728d0189fd79ac3a6eb553e70d205bf946e8b7b2 /shell
parent856af4e3dc2406df7a2baed8058188acca9dbde6 (diff)
downloadbusybox-4c07ad913029c20d845cbb3d9ff80d6332835ae1.tar.gz
busybox-4c07ad913029c20d845cbb3d9ff80d6332835ae1.tar.bz2
ash: add test for issue with here document
This used to work but doesn't now: foo () { cat <<EOF && { echo "$1" ; } $1 EOF } foo "bar" Reported-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> (cherry picked from commit 9121510dc659baf6664456796c195460468c850b)
Diffstat (limited to 'shell')
-rw-r--r--shell/ash_test/ash-heredoc/heredoc2.right2
-rwxr-xr-xshell/ash_test/ash-heredoc/heredoc2.tests7
2 files changed, 9 insertions, 0 deletions
diff --git a/shell/ash_test/ash-heredoc/heredoc2.right b/shell/ash_test/ash-heredoc/heredoc2.right
new file mode 100644
index 000000000..a486f1ac4
--- /dev/null
+++ b/shell/ash_test/ash-heredoc/heredoc2.right
@@ -0,0 +1,2 @@
+bar
+bar
diff --git a/shell/ash_test/ash-heredoc/heredoc2.tests b/shell/ash_test/ash-heredoc/heredoc2.tests
new file mode 100755
index 000000000..6d9ccb6cc
--- /dev/null
+++ b/shell/ash_test/ash-heredoc/heredoc2.tests
@@ -0,0 +1,7 @@
+foo () {
+cat <<EOF && { echo "$1" ; }
+$1
+EOF
+}
+
+foo "bar"