hush: make getch/peek functions directly called
[oweals/busybox.git] / shell / hush_test / hush-vars / param_expand_len.tests
index 90f47d2fb24218822861676c00681121e416c1ba..369c8d456a8316c131de4c99dd6590d08a039a66 100755 (executable)
@@ -1,12 +1,24 @@
-# 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
 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}