summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-quoting
diff options
context:
space:
mode:
authorRon Yorston2016-04-03 22:43:14 +0100
committerDenys Vlasenko2016-04-15 22:16:46 +0200
commit84ba50c32f7dbfccddd5c5ca34d48d97c3f72193 (patch)
treedd2120def41d29e64d3a469edb26ece02f45724b /shell/ash_test/ash-quoting
parent2b91958dff0b7bae83cf2c3f2db55bd248fe0956 (diff)
downloadbusybox-84ba50c32f7dbfccddd5c5ca34d48d97c3f72193.zip
busybox-84ba50c32f7dbfccddd5c5ca34d48d97c3f72193.tar.gz
ash: bash-compatible $'...' shouldn't expand in double quotes
Bash doesn't expand its $'...' construct in double quotes: $ echo "$'a\tb'" $'a\tb' Change BusyBox ash to do the same. This also fixes a problem with here documents where BusyBox ash gave an incorrect result for: $ cat <<EOF > '$' > EOF '$' Reported-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-quoting')
-rw-r--r--shell/ash_test/ash-quoting/dollar_squote_bash1.right1
-rwxr-xr-xshell/ash_test/ash-quoting/dollar_squote_bash1.tests1
2 files changed, 2 insertions, 0 deletions
diff --git a/shell/ash_test/ash-quoting/dollar_squote_bash1.right b/shell/ash_test/ash-quoting/dollar_squote_bash1.right
index 57536b1..9f4e25e 100644
--- a/shell/ash_test/ash-quoting/dollar_squote_bash1.right
+++ b/shell/ash_test/ash-quoting/dollar_squote_bash1.right
@@ -1,4 +1,5 @@
a b
+$'a\tb'
a
b c
def
diff --git a/shell/ash_test/ash-quoting/dollar_squote_bash1.tests b/shell/ash_test/ash-quoting/dollar_squote_bash1.tests
index 93a56ca..6fc411b 100755
--- a/shell/ash_test/ash-quoting/dollar_squote_bash1.tests
+++ b/shell/ash_test/ash-quoting/dollar_squote_bash1.tests
@@ -1,4 +1,5 @@
echo $'a\tb'
+echo "$'a\tb'"
echo $'a\nb' $'c\nd''ef'
echo $'a\'b' $'c\"d' $'e\\f'
echo $'a\63b' $'c\063b' $'e\0633f'