aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-10-02 15:20:57 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-10-02 15:20:57 +0200
commitae4bd34e6bc54cb6b9277f2ec231892517ed1c68 (patch)
tree1454f75d428fcccc17128e65b575acf2d87421e8 /shell/hush_test
parent8e2c9cc2fcfe23625e1c5845f99dfc93e022fc9b (diff)
downloadbusybox-ae4bd34e6bc54cb6b9277f2ec231892517ed1c68.tar.gz
hush testsuite: add glob_dir.tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rwxr-xr-xshell/hush_test/hush-glob/bash_brace1.tests2
-rw-r--r--shell/hush_test/hush-glob/glob_dir.right19
-rwxr-xr-xshell/hush_test/hush-glob/glob_dir.tests25
3 files changed, 45 insertions, 1 deletions
diff --git a/shell/hush_test/hush-glob/bash_brace1.tests b/shell/hush_test/hush-glob/bash_brace1.tests
index eb2f0e974..eae2e2a84 100755
--- a/shell/hush_test/hush-glob/bash_brace1.tests
+++ b/shell/hush_test/hush-glob/bash_brace1.tests
@@ -4,7 +4,7 @@ v='*brace1.t*'; echo $v
# ...but not brace expanded:
v='*{b,b}race1.t*'; echo $v
-# whereas direct brces are expanded:
+# whereas direct braces are expanded:
echo *{b,b}race1.t*
echo Done: $?
diff --git a/shell/hush_test/hush-glob/glob_dir.right b/shell/hush_test/hush-glob/glob_dir.right
new file mode 100644
index 000000000..aa90514d5
--- /dev/null
+++ b/shell/hush_test/hush-glob/glob_dir.right
@@ -0,0 +1,19 @@
+dirtest/z.tmp
+dirtest/z.tmp
+dirtest/z.tmp
+dirtest/z.tmp
+dirtest/z.tmp
+dirtest/z.tmp
+dirtest/z.tmp
+dirtest/z.tmp
+dirtest/z.tmp
+
+*/z.tmp
+*/z.*
+*/?.*
+*/z*p
+d*r*e*t/z*p
+*\/z.tmp
+*/z.*
+*/z*p
+d*r*e*t/z*p
diff --git a/shell/hush_test/hush-glob/glob_dir.tests b/shell/hush_test/hush-glob/glob_dir.tests
new file mode 100755
index 000000000..dc4c4fdb5
--- /dev/null
+++ b/shell/hush_test/hush-glob/glob_dir.tests
@@ -0,0 +1,25 @@
+mkdir dirtest
+ >dirtest/z.tmp
+
+echo */z.tmp
+echo */z.*
+echo */?.*
+echo */z*p
+echo d*r*e*t/z*p
+echo *"/z.t"mp
+echo */z"."*
+echo *"/z"*"p"
+echo "d"*r*e*t"/"z*p
+echo
+echo \*/z.tmp
+echo "*"/z.*
+echo */"?".*
+echo */z"*p"
+echo d*r*e\*t/z*p
+echo *"\\/z.t"mp
+echo */z".*"
+echo *"/z"\*"p"
+echo "d*"r*e*t"/"z*p
+
+rm dirtest/z.tmp
+rmdir dirtest