hush testsuite: add glob_dir.tests
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 2 Oct 2016 13:20:57 +0000 (15:20 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 2 Oct 2016 13:20:57 +0000 (15:20 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/hush_test/hush-glob/bash_brace1.tests
shell/hush_test/hush-glob/glob_dir.right [new file with mode: 0644]
shell/hush_test/hush-glob/glob_dir.tests [new file with mode: 0755]

index eb2f0e9746c42166759acb6dccdaafce7eae6a92..eae2e2a8444476e3a97e9288e9de4213df65bdf5 100755 (executable)
@@ -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 (file)
index 0000000..aa90514
--- /dev/null
@@ -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 (executable)
index 0000000..dc4c4fd
--- /dev/null
@@ -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