aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-glob
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-10-02 15:17:15 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-10-02 15:17:15 +0200
commit8e2c9cc2fcfe23625e1c5845f99dfc93e022fc9b (patch)
treecc2a99f8b7840b57adcf0998d7e3916a337644dc /shell/ash_test/ash-glob
parent37dc08b874d6a24bd5e4b6aff62577ecc1364275 (diff)
downloadbusybox-w32-8e2c9cc2fcfe23625e1c5845f99dfc93e022fc9b.tar.gz
busybox-w32-8e2c9cc2fcfe23625e1c5845f99dfc93e022fc9b.tar.bz2
busybox-w32-8e2c9cc2fcfe23625e1c5845f99dfc93e022fc9b.zip
ash: fix globbing bugs when using glibc glob()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-glob')
-rw-r--r--shell/ash_test/ash-glob/glob_dir.right19
-rwxr-xr-xshell/ash_test/ash-glob/glob_dir.tests25
2 files changed, 44 insertions, 0 deletions
diff --git a/shell/ash_test/ash-glob/glob_dir.right b/shell/ash_test/ash-glob/glob_dir.right
new file mode 100644
index 000000000..aa90514d5
--- /dev/null
+++ b/shell/ash_test/ash-glob/glob_dir.right
@@ -0,0 +1,19 @@
1dirtest/z.tmp
2dirtest/z.tmp
3dirtest/z.tmp
4dirtest/z.tmp
5dirtest/z.tmp
6dirtest/z.tmp
7dirtest/z.tmp
8dirtest/z.tmp
9dirtest/z.tmp
10
11*/z.tmp
12*/z.*
13*/?.*
14*/z*p
15d*r*e*t/z*p
16*\/z.tmp
17*/z.*
18*/z*p
19d*r*e*t/z*p
diff --git a/shell/ash_test/ash-glob/glob_dir.tests b/shell/ash_test/ash-glob/glob_dir.tests
new file mode 100755
index 000000000..dc4c4fdb5
--- /dev/null
+++ b/shell/ash_test/ash-glob/glob_dir.tests
@@ -0,0 +1,25 @@
1mkdir dirtest
2 >dirtest/z.tmp
3
4echo */z.tmp
5echo */z.*
6echo */?.*
7echo */z*p
8echo d*r*e*t/z*p
9echo *"/z.t"mp
10echo */z"."*
11echo *"/z"*"p"
12echo "d"*r*e*t"/"z*p
13echo
14echo \*/z.tmp
15echo "*"/z.*
16echo */"?".*
17echo */z"*p"
18echo d*r*e\*t/z*p
19echo *"\\/z.t"mp
20echo */z".*"
21echo *"/z"\*"p"
22echo "d*"r*e*t"/"z*p
23
24rm dirtest/z.tmp
25rmdir dirtest