diff options
author | Denys Vlasenko | 2018-03-02 20:48:36 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-03-02 20:48:36 +0100 |
commit | d4802c6243e64e28690577bc0bb4f030581c496b (patch) | |
tree | e1b3785c46bd4361419fb22718b319cf3a835658 /shell/hush_test | |
parent | 55f8133a4fb207d6fecd02f43c36809d3c2f6672 (diff) | |
download | busybox-d4802c6243e64e28690577bc0bb4f030581c496b.zip busybox-d4802c6243e64e28690577bc0bb4f030581c496b.tar.gz |
hush: fix a='a\\'; echo "${a%\\\\}"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
4 files changed, 14 insertions, 0 deletions
diff --git a/shell/hush_test/hush-quoting/squote_in_varexp1.right b/shell/hush_test/hush-quoting/squote_in_varexp1.right new file mode 100644 index 0000000..9d0add3 --- /dev/null +++ b/shell/hush_test/hush-quoting/squote_in_varexp1.right @@ -0,0 +1,3 @@ +Nothing: +Nothing: +Ok:0 diff --git a/shell/hush_test/hush-quoting/squote_in_varexp1.tests b/shell/hush_test/hush-quoting/squote_in_varexp1.tests new file mode 100755 index 0000000..efb380d --- /dev/null +++ b/shell/hush_test/hush-quoting/squote_in_varexp1.tests @@ -0,0 +1,4 @@ +x='\\\\' +printf Nothing:'%s\n' ${x#\\\\\\\\} +printf Nothing:'%s\n' "${x#\\\\\\\\}" +echo Ok:$? diff --git a/shell/hush_test/hush-quoting/squote_in_varexp2.right b/shell/hush_test/hush-quoting/squote_in_varexp2.right new file mode 100644 index 0000000..9d0add3 --- /dev/null +++ b/shell/hush_test/hush-quoting/squote_in_varexp2.right @@ -0,0 +1,3 @@ +Nothing: +Nothing: +Ok:0 diff --git a/shell/hush_test/hush-quoting/squote_in_varexp2.tests b/shell/hush_test/hush-quoting/squote_in_varexp2.tests new file mode 100755 index 0000000..806ad12 --- /dev/null +++ b/shell/hush_test/hush-quoting/squote_in_varexp2.tests @@ -0,0 +1,4 @@ +x='\\\\' +printf Nothing:'%s\n' ${x#'\\\\'} +printf Nothing:'%s\n' "${x#'\\\\'}" +echo Ok:$? |