summaryrefslogtreecommitdiff
path: root/shell/ash_test
diff options
context:
space:
mode:
authorDenys Vlasenko2019-05-15 13:39:19 +0200
committerDenys Vlasenko2019-05-15 13:39:19 +0200
commit9e0adb9b09ec14afe2e5a222dda1c447f336ea06 (patch)
tree49ba7977aab90ee21b90f30cd49d68a1bb715585 /shell/ash_test
parent8402969d4892891ddfde524fbb9ee73e076f3771 (diff)
downloadbusybox-9e0adb9b09ec14afe2e5a222dda1c447f336ea06.zip
busybox-9e0adb9b09ec14afe2e5a222dda1c447f336ea06.tar.gz
hush: fix quoted "${notexist-}" expansion to not disappear
function old new delta expand_one_var 2296 2311 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test')
-rw-r--r--shell/ash_test/ash-vars/param_expand_default.right2
-rwxr-xr-xshell/ash_test/ash-vars/param_expand_default.tests5
2 files changed, 7 insertions, 0 deletions
diff --git a/shell/ash_test/ash-vars/param_expand_default.right b/shell/ash_test/ash-vars/param_expand_default.right
index 3eecd13..7a42f67 100644
--- a/shell/ash_test/ash-vars/param_expand_default.right
+++ b/shell/ash_test/ash-vars/param_expand_default.right
@@ -5,3 +5,5 @@ _aaaa _aaaa _aaaa _aaaa _aaaa
_ _ _ _word _word
_ _ _ _ _word
_fff _fff _fff _fff _fff
+1:1
+0:0
diff --git a/shell/ash_test/ash-vars/param_expand_default.tests b/shell/ash_test/ash-vars/param_expand_default.tests
index 5e42d30..b5edfe1 100755
--- a/shell/ash_test/ash-vars/param_expand_default.tests
+++ b/shell/ash_test/ash-vars/param_expand_default.tests
@@ -21,3 +21,8 @@ echo _$f _${f-} _${f:-} _${f-word} _${f:-word}
f=fff
echo _$f _${f-} _${f:-} _${f-word} _${f:-word}
+
+set --
+set -- "${1-}"; echo 1:$#
+set --
+set -- ${1-}; echo 0:$#