diff options
author | Denys Vlasenko | 2023-06-12 16:37:19 +0200 |
---|---|---|
committer | Denys Vlasenko | 2023-06-12 16:39:32 +0200 |
commit | bab8828b0dad1d51d6b34e38249f0641ca64b1e9 (patch) | |
tree | e8726c89265aaad6f80581ad9059a0e74ea2de78 /shell/hush_test | |
parent | 8f0e4c42c630126daafd834175b86d2b28f5b798 (diff) | |
download | busybox-bab8828b0dad1d51d6b34e38249f0641ca64b1e9.zip busybox-bab8828b0dad1d51d6b34e38249f0641ca64b1e9.tar.gz |
hush: fix expansion of space in "a=${a:+$a }c" construct
function old new delta
encode_then_append_var_plusminus 554 552 -2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-quoting/space_in_varexp1.right | 2 | ||||
-rwxr-xr-x | shell/hush_test/hush-quoting/space_in_varexp1.tests | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/shell/hush_test/hush-quoting/space_in_varexp1.right b/shell/hush_test/hush-quoting/space_in_varexp1.right new file mode 100644 index 0000000..a617a91 --- /dev/null +++ b/shell/hush_test/hush-quoting/space_in_varexp1.right @@ -0,0 +1,2 @@ +1:'b c' +2:'b c' diff --git a/shell/hush_test/hush-quoting/space_in_varexp1.tests b/shell/hush_test/hush-quoting/space_in_varexp1.tests new file mode 100755 index 0000000..1589587 --- /dev/null +++ b/shell/hush_test/hush-quoting/space_in_varexp1.tests @@ -0,0 +1,6 @@ +a=b +a=${a:+$a }c +echo "1:'$a'" +a=b +a="${a:+$a }c" +echo "2:'$a'" |