summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-vars
diff options
context:
space:
mode:
authorMike Frysinger2009-04-09 23:01:47 +0000
committerMike Frysinger2009-04-09 23:01:47 +0000
commite05f9286a943eb74bdcdead86c016e6c8cc5c082 (patch)
tree4f62de1de6c5163d2721841a178e24d6a246f002 /shell/hush_test/hush-vars
parent57e746781c6cd836a9564299ef04d2ae4d995f1c (diff)
downloadbusybox-e05f9286a943eb74bdcdead86c016e6c8cc5c082.zip
busybox-e05f9286a943eb74bdcdead86c016e6c8cc5c082.tar.gz
add test cases for parameter substitution with unset/null strings
Diffstat (limited to 'shell/hush_test/hush-vars')
-rw-r--r--shell/hush_test/hush-vars/var_posix1.right16
-rwxr-xr-xshell/hush_test/hush-vars/var_posix1.tests22
2 files changed, 38 insertions, 0 deletions
diff --git a/shell/hush_test/hush-vars/var_posix1.right b/shell/hush_test/hush-vars/var_posix1.right
index 55f3579..702bbca 100644
--- a/shell/hush_test/hush-vars/var_posix1.right
+++ b/shell/hush_test/hush-vars/var_posix1.right
@@ -1,3 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
abcdcd
abcdcd
abcdcd
diff --git a/shell/hush_test/hush-vars/var_posix1.tests b/shell/hush_test/hush-vars/var_posix1.tests
index 4139e2c..d3205b1 100755
--- a/shell/hush_test/hush-vars/var_posix1.tests
+++ b/shell/hush_test/hush-vars/var_posix1.tests
@@ -1,3 +1,25 @@
+unset var
+
+echo ${var#}
+echo ${var##}
+echo ${var#*}
+echo ${var##*}
+echo ${var%}
+echo ${var%%}
+echo ${var%*}
+echo ${var%%*}
+
+var=
+
+echo ${var#}
+echo ${var##}
+echo ${var#*}
+echo ${var##*}
+echo ${var%}
+echo ${var%%}
+echo ${var%*}
+echo ${var%%*}
+
var=ababcdcd
echo ${var#ab}