summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-heredoc/heredoc_backquote1.tests
diff options
context:
space:
mode:
authorDenys Vlasenko2018-04-01 16:38:32 +0200
committerDenys Vlasenko2018-04-01 16:38:32 +0200
commit41fddb43729373740bfba82da83373ec5ba49fc8 (patch)
tree94c8010ca829d3bfe5ee02d654c65d37240c98c5 /shell/ash_test/ash-heredoc/heredoc_backquote1.tests
parent1e5111b0f80b1f3d7f2fc8254cb70de067317403 (diff)
downloadbusybox-41fddb43729373740bfba82da83373ec5ba49fc8.zip
busybox-41fddb43729373740bfba82da83373ec5ba49fc8.tar.gz
parser: Fix backquote support in here-document EOF mark
Upstream commit: Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Thu Mar 15 18:27:30 2018 +0800 parser: Fix backquote support in here-document EOF mark Currently using backquotes in a here-document EOF mark is broken because dash tries to do command substitution on it. This patch fixes it by checking whether we're looking for an EOF mark during tokenisation. Reported-by: Harald van Dijk <harald@gigawatt.nl> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> With added fix for quoted-ness of the EOF mark. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-heredoc/heredoc_backquote1.tests')
-rwxr-xr-xshell/ash_test/ash-heredoc/heredoc_backquote1.tests10
1 files changed, 10 insertions, 0 deletions
diff --git a/shell/ash_test/ash-heredoc/heredoc_backquote1.tests b/shell/ash_test/ash-heredoc/heredoc_backquote1.tests
new file mode 100755
index 0000000..ec3d8fe
--- /dev/null
+++ b/shell/ash_test/ash-heredoc/heredoc_backquote1.tests
@@ -0,0 +1,10 @@
+cat <<EO`true`F
+heredoc1
+EO`true`F
+echo Ok1:$?
+
+cat <<EO`true`F
+heredoc2
+EO`false`F
+EO`true`F
+echo Ok2:$?