summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/shell/hush_test/hush-glob
diff options
context:
space:
mode:
Diffstat (limited to 'release/src/router/busybox/shell/hush_test/hush-glob')
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-glob/glob1.right2
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-glob/glob1.tests2
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.right6
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.tests10
-rw-r--r--release/src/router/busybox/shell/hush_test/hush-glob/glob_redir.right2
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-glob/glob_redir.tests9
6 files changed, 31 insertions, 0 deletions
diff --git a/release/src/router/busybox/shell/hush_test/hush-glob/glob1.right b/release/src/router/busybox/shell/hush_test/hush-glob/glob1.right
new file mode 100644
index 00000000..f29ab4e6
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-glob/glob1.right
@@ -0,0 +1,2 @@
+glob1.tests
+glob1.tests
diff --git a/release/src/router/busybox/shell/hush_test/hush-glob/glob1.tests b/release/src/router/busybox/shell/hush_test/hush-glob/glob1.tests
new file mode 100755
index 00000000..f980ce06
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-glob/glob1.tests
@@ -0,0 +1,2 @@
+echo *glob1?t[e]sts*
+echo "glob1"?'t'[e]s*
diff --git a/release/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.right b/release/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.right
new file mode 100644
index 00000000..d46e4436
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.right
@@ -0,0 +1,6 @@
+ZVAR=z.tmp ZVAR=*.tmp ZVAR=[z].tmp
+ZVAR=z.tmp ZVAR=*.tmp ZVAR=[z].tmp
+*.tmp
+ZVAR=z.tmp z.tmp
+ZVAR=z.tmp ZVAR=*.tmp ZVAR=[z].tmp
+ZVAR=z.tmp ZVAR=*.tmp ZVAR=[z].tmp
diff --git a/release/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.tests b/release/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.tests
new file mode 100755
index 00000000..0b158f20
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-glob/glob_and_assign.tests
@@ -0,0 +1,10 @@
+>ZVAR=z.tmp
+>z.tmp
+ZVAR=*.tmp echo ZVAR=*.tmp "ZVAR=*.tmp" "ZVAR=[z].tmp"
+ZVAR=*.tmp /bin/echo ZVAR=*.tmp "ZVAR=*.tmp" "ZVAR=[z].tmp"
+ZVAR=*.tmp
+echo "$ZVAR"
+echo $ZVAR
+echo ZVAR=*.tmp "ZVAR=*.tmp" "ZVAR=[z].tmp"
+/bin/echo ZVAR=*.tmp "ZVAR=*.tmp" "ZVAR=[z].tmp"
+rm ZVAR=z.tmp z.tmp
diff --git a/release/src/router/busybox/shell/hush_test/hush-glob/glob_redir.right b/release/src/router/busybox/shell/hush_test/hush-glob/glob_redir.right
new file mode 100644
index 00000000..fbd0309b
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-glob/glob_redir.right
@@ -0,0 +1,2 @@
+z.tmp:
+?.tmp: TEST
diff --git a/release/src/router/busybox/shell/hush_test/hush-glob/glob_redir.tests b/release/src/router/busybox/shell/hush_test/hush-glob/glob_redir.tests
new file mode 100755
index 00000000..621d1201
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-glob/glob_redir.tests
@@ -0,0 +1,9 @@
+# Redirections are not globbed.
+# bash:
+# if run as "sh", they are not globbed, but
+# if run as "bash", they are!
+>z.tmp
+echo TEST >?.tmp
+echo 'z.tmp:' `cat 'z.tmp'`
+echo '?.tmp:' `cat '?.tmp'`
+rm 'z.tmp' '?.tmp'