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>
This commit is contained in:
Ron Yorston 2015-10-29 11:29:59 +00:00 committed by Denys Vlasenko
parent 4c8576fea1
commit 9121510dc6
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,2 @@
bar
bar

View File

@ -0,0 +1,7 @@
foo () {
cat <<EOF && { echo "$1" ; }
$1
EOF
}
foo "bar"