diff options
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-vars/param_expand_len.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/param_expand_len.tests | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/param_expand_len.right b/shell/hush_test/hush-vars/param_expand_len.right index 96e8cb5..48d01d2 100644 --- a/shell/hush_test/hush-vars/param_expand_len.right +++ b/shell/hush_test/hush-vars/param_expand_len.right @@ -7,3 +7,6 @@ Make sure len parsing doesnt break arg count Testing len op 4 3 2 1 0 0 0 3 0 +Nothing: +Nothing: +One:1 diff --git a/shell/hush_test/hush-vars/param_expand_len.tests b/shell/hush_test/hush-vars/param_expand_len.tests index fe20a45..369c8d4 100755 --- a/shell/hush_test/hush-vars/param_expand_len.tests +++ b/shell/hush_test/hush-vars/param_expand_len.tests @@ -15,3 +15,10 @@ unset e f=abc g= echo ${#e} ${#f} ${#g} + +set -- a +# This must be interpreted as: $# ("1"), then remove trailing "1". +# IOW: empty result. +echo Nothing:${##1} +echo Nothing:${#%1} +echo One:${##x} |