diff options
author | Ron Yorston <rmy@pobox.com> | 2015-10-29 11:29:59 +0000 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-29 19:12:03 +0100 |
commit | 9121510dc659baf6664456796c195460468c850b (patch) | |
tree | 9d810900b01bcb84ffedede4aa29a18963d2f209 | |
parent | 4c8576fea18552d93d43c367638bacc54c26f2b7 (diff) | |
download | busybox-9121510dc659baf6664456796c195460468c850b.tar.gz |
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>
-rw-r--r-- | shell/ash_test/ash-heredoc/heredoc2.right | 2 | ||||
-rwxr-xr-x | shell/ash_test/ash-heredoc/heredoc2.tests | 7 |
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" |