ash: fix globbing bugs when using glibc glob()

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2016-10-02 15:17:15 +02:00
parent 37dc08b874
commit 8e2c9cc2fc
3 changed files with 66 additions and 7 deletions

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