hush testsuite: add glob_dir.tests

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2016-10-02 15:20:57 +02:00
parent 8e2c9cc2fc
commit ae4bd34e6b
3 changed files with 45 additions and 1 deletions

View File

@ -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: $?

View File

@ -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

View File

@ -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