aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-vars/param_expand_len.right5
-rwxr-xr-xshell/hush_test/hush-vars/param_expand_len.tests7
2 files changed, 11 insertions, 1 deletions
diff --git a/shell/hush_test/hush-vars/param_expand_len.right b/shell/hush_test/hush-vars/param_expand_len.right
index 2d633a148..96e8cb59b 100644
--- a/shell/hush_test/hush-vars/param_expand_len.right
+++ b/shell/hush_test/hush-vars/param_expand_len.right
@@ -1,4 +1,9 @@
+0
+0
+1
+Make sure len parsing doesnt break arg count
0 0
4 4
+Testing len op
4 3 2 1 0 0
0 3 0
diff --git a/shell/hush_test/hush-vars/param_expand_len.tests b/shell/hush_test/hush-vars/param_expand_len.tests
index 90f47d2fb..fe20a45e9 100755
--- a/shell/hush_test/hush-vars/param_expand_len.tests
+++ b/shell/hush_test/hush-vars/param_expand_len.tests
@@ -1,9 +1,14 @@
-# make sure len parsing doesnt break arg count
+"$THIS_SH" -c 'echo $#'
+"$THIS_SH" -c 'echo $#' arg0
+"$THIS_SH" -c 'echo $#' arg0 arg1
+
+echo Make sure len parsing doesnt break arg count
set --
echo $# ${#}
set -- aaaa bbb cc d
echo $# ${#}
+echo Testing len op
echo ${#1} ${#2} ${#3} ${#4} ${#5} ${#6}
unset e