aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-misc
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-09-12 15:05:39 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-09-12 15:05:39 +0200
commitacd5bc8f649fad335d80c5289512b404f08ac8e2 (patch)
tree56594a40d09e2032b7be039c3c1c567a3871dde1 /shell/hush_test/hush-misc
parent958581a8d9583da8b9df0b69123e0c3990f7b3ff (diff)
downloadbusybox-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-misc')
-rw-r--r--shell/hush_test/hush-misc/heredoc_backslash1.right8
-rwxr-xr-xshell/hush_test/hush-misc/heredoc_backslash1.tests8
2 files changed, 16 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/heredoc_backslash1.right b/shell/hush_test/hush-misc/heredoc_backslash1.right
index 2633908fb..6a6114821 100644
--- a/shell/hush_test/hush-misc/heredoc_backslash1.right
+++ b/shell/hush_test/hush-misc/heredoc_backslash1.right
@@ -5,6 +5,8 @@ a\\
b
123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
+ 123456 `echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-'`
+ 123456 $(echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-')
c\
Unquoted heredoc:
@@ -13,6 +15,8 @@ a\
b
123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
-qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
+ 123456 v-$a-\t-\-\"-\x-`-\--\z-\*-\?-
+ 123456 v-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-
cEOF2
Quoted -heredoc:
@@ -22,6 +26,8 @@ a\\
b
123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
+ 123456 `echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-'`
+ 123456 $(echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-')
c\
Unquoted -heredoc:
@@ -30,6 +36,8 @@ a\
b
123456 -qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
-qwerty-\t-\-\"-\'-`-\--\z-\*-\?-
+ 123456 v-$a-\t-\-\"-\x-`-\--\z-\*-\?-
+ 123456 v-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-
cEOF4
Done: 0
diff --git a/shell/hush_test/hush-misc/heredoc_backslash1.tests b/shell/hush_test/hush-misc/heredoc_backslash1.tests
index 22045d42e..501af5490 100755
--- a/shell/hush_test/hush-misc/heredoc_backslash1.tests
+++ b/shell/hush_test/hush-misc/heredoc_backslash1.tests
@@ -11,6 +11,8 @@ a\\
b
123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
+ 123456 `echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-'`
+ 123456 $(echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-')
c\
EOF1
echo
@@ -23,6 +25,8 @@ a\\
b
123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
+ 123456 `echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-'`
+ 123456 $(echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-')
c\
EOF2
EOF2
@@ -36,6 +40,8 @@ a\\
b
123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
+ 123456 `echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-'`
+ 123456 $(echo v'-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-')
c\
EOF3
# In -heredoc case the marker is detected even if it is indented.
@@ -49,6 +55,8 @@ a\\
b
123456 -$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
-$a-\t-\\-\"-\'-\`-\--\z-\*-\?-
+ 123456 `echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-'`
+ 123456 $(echo v'-$a-\t-\\-\"-\x-\`-\--\z-\*-\?-')
c\
EOF4
EOF4