summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-psubst
diff options
context:
space:
mode:
authorDenys Vlasenko2010-09-12 15:05:39 +0200
committerDenys Vlasenko2010-09-12 15:05:39 +0200
commitacd5bc8f649fad335d80c5289512b404f08ac8e2 (patch)
tree56594a40d09e2032b7be039c3c1c567a3871dde1 /shell/hush_test/hush-psubst
parent958581a8d9583da8b9df0b69123e0c3990f7b3ff (diff)
downloadbusybox-acd5bc8f649fad335d80c5289512b404f08ac8e2.zip
busybox-acd5bc8f649fad335d80c5289512b404f08ac8e2.tar.gz
hush: fix handling of \" in quoted/unquoted `cmd`
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'shell/hush_test/hush-psubst')
-rw-r--r--shell/hush_test/hush-psubst/tick3.right2
-rwxr-xr-xshell/hush_test/hush-psubst/tick3.tests6
2 files changed, 5 insertions, 3 deletions
diff --git a/shell/hush_test/hush-psubst/tick3.right b/shell/hush_test/hush-psubst/tick3.right
index dc84e92..00f267a 100644
--- a/shell/hush_test/hush-psubst/tick3.right
+++ b/shell/hush_test/hush-psubst/tick3.right
@@ -2,5 +2,5 @@
$TEST
Q
a\bc
-a"c
+11-$a-\t-\-\"-`-\--\z-\*-\?-22 33-$a-\t-\-"-`-\--\z-\*-\?-44
done:0
diff --git a/shell/hush_test/hush-psubst/tick3.tests b/shell/hush_test/hush-psubst/tick3.tests
index 469c43c..3aeb241 100755
--- a/shell/hush_test/hush-psubst/tick3.tests
+++ b/shell/hush_test/hush-psubst/tick3.tests
@@ -7,6 +7,8 @@ echo `echo '\'TEST\`echo ZZ\`BEST`
echo `echo \\$TEST`
echo `echo \$TEST`
echo a`echo \\\\b`c
-# \" etc are NOT special (passed verbatim WITH \)!
-echo a`echo \"`c
+
+# \" is not special if in unquoted `cmd` (passed verbatim WITH \),
+# but is special in quoted one
+echo `echo 11'-$a-\t-\\-\"-\`-\--\z-\*-\?-'22` "`echo 33'-$a-\t-\\-\"-\`-\--\z-\*-\?-'44`"
echo done:$?