diff options
author | Denys Vlasenko | 2024-02-26 16:26:15 +0100 |
---|---|---|
committer | Denys Vlasenko | 2024-02-26 16:27:53 +0100 |
commit | c5a1be25ba6dd705382ce6c25d96a32f79974c04 (patch) | |
tree | 48b92a1b07b47329a2d48867ee5b7c11a84bea4a /shell/hush_test | |
parent | f873c63085e3f3745040286999779077ccc03987 (diff) | |
download | busybox-c5a1be25ba6dd705382ce6c25d96a32f79974c04.zip busybox-c5a1be25ba6dd705382ce6c25d96a32f79974c04.tar.gz |
ash: fix handling of single-quoted strings in pattern substitution
function old new delta
subevalvar 1576 1588 +12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-quoting/dollar_repl_bash2.right | 4 | ||||
-rwxr-xr-x | shell/hush_test/hush-quoting/dollar_repl_bash2.tests | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/shell/hush_test/hush-quoting/dollar_repl_bash2.right b/shell/hush_test/hush-quoting/dollar_repl_bash2.right new file mode 100644 index 0000000..e3fcd58 --- /dev/null +++ b/shell/hush_test/hush-quoting/dollar_repl_bash2.right @@ -0,0 +1,4 @@ +axxb +axxb +axxb +axxb diff --git a/shell/hush_test/hush-quoting/dollar_repl_bash2.tests b/shell/hush_test/hush-quoting/dollar_repl_bash2.tests new file mode 100755 index 0000000..45c7a10 --- /dev/null +++ b/shell/hush_test/hush-quoting/dollar_repl_bash2.tests @@ -0,0 +1,8 @@ +v="x/x" +# The second / is quoted, should not be treated as separator +echo a${v/'/'}b +# The second / is escaped, should not be treated as separator +echo a${v/\/}b + +echo "a${v/'/'}b" +echo "a${v/\/}b" |