summaryrefslogtreecommitdiff
path: root/wildtest.txt
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2003-07-07 07:10:40 +0000
committerWayne Davison <wayned@samba.org>2003-07-07 07:10:40 +0000
commit85b80fbc734944d98c2f84122903964ab7412d20 (patch)
tree188e4e1ba972beb3b245100ed4d4ae7bff1cd6c3 /wildtest.txt
parent16859cdbdcbf102f8573c5dc344f09b2817096bb (diff)
downloadrsync-85b80fbc734944d98c2f84122903964ab7412d20.tar.gz
rsync-85b80fbc734944d98c2f84122903964ab7412d20.tar.bz2
rsync-85b80fbc734944d98c2f84122903964ab7412d20.zip
A few more tests.
Diffstat (limited to 'wildtest.txt')
-rw-r--r--wildtest.txt32
1 files changed, 26 insertions, 6 deletions
diff --git a/wildtest.txt b/wildtest.txt
index 2f2963f4..c93f60bb 100644
--- a/wildtest.txt
+++ b/wildtest.txt
@@ -1,9 +1,9 @@
# Input is in the following format (all items white-space separated):
#
-# The first two items are 1 or 0 indicating if the wildmat call is expected
-# to succeed and if fnmatch works the same way as wildmat, respectively.
-# After that is a text string for the match, and a pattern string. Strings
-# can be quoted in either double or single quotes, as well as backticks.
+# The first two items are 1 or 0 indicating if the wildmat call is expected to
+# succeed and if fnmatch works the same way as wildmat, respectively. After
+# that is a text string for the match, and a pattern string. Strings can be
+# quoted (if desired) in either double or single quotes, as well as backticks.
#
# MATCH FNMATCH_SAME "text to match" 'pattern to use'
@@ -47,18 +47,30 @@
1 1 bar/baz/foo **/foo
0 1 bar/baz/foo */foo
0 0 foo/bar/baz **/bar*
+1 1 deep/foo/bar/baz **/bar/*
1 1 foo/bar/baz **/bar**
+1 1 foo/bar/baz/x */bar/**
+0 0 deep/foo/bar/baz/x */bar/**
+1 1 deep/foo/bar/baz/x **/bar/*/*
# Various additional tests
0 1 acrt a[c-c]st
+1 1 acrt a[c-c]rt
0 1 ] [!]-]
1 1 a [!]-]
0 1 '' \
0 1 \ \
+0 1 /\ */\
+1 1 /\ */\\
1 1 foo foo
1 1 @foo @foo
0 1 foo @foo
1 1 [ab] \[ab]
+1 1 [ab] [[]ab]
+1 1 [ab] [[:]ab]
+0 1 [ab] [[::]ab]
+1 1 [ab] [[:digit]ab]
+1 1 [ab] [\[:]ab]
1 1 ?a?b \??\?b
1 1 abc \a\b\c
0 1 foo ''
@@ -69,7 +81,7 @@
0 1 a [[:digit:][:upper:][:space:]]
1 1 A [[:digit:][:upper:][:space:]]
1 1 1 [[:digit:][:upper:][:space:]]
-0 1 1 [[:digit:][:upper:][:spack:]]
+0 1 1 [[:digit:][:upper:][:spaci:]]
1 1 ' ' [[:digit:][:upper:][:space:]]
0 1 . [[:digit:][:upper:][:space:]]
1 1 . [[:digit:][:punct:][:space:]]
@@ -80,6 +92,10 @@
1 1 … [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
1 1  [^[:alnum:][:alpha:][:blank:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
1 1 . [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]
+1 1 5 [a-c[:digit:]x-z]
+1 1 b [a-c[:digit:]x-z]
+1 1 y [a-c[:digit:]x-z]
+0 1 q [a-c[:digit:]x-z]
# Additional tests, including some malformed wildmats
1 1 ] [\\-^]
@@ -125,9 +141,13 @@
1 1 - [,-.]
0 1 + [,-.]
0 1 -.] [,-.]
+1 1 2 [\1-\3]
+1 1 3 [\1-\3]
+0 1 4 [\1-\3]
1 1 \ [[-\]]
+1 1 [ [[-\]]
+1 1 ] [[-\]]
0 1 - [[-\]]
-0 1 /\ /\
# Test recursion and the abort code (use "wildtest -i" to see iteration counts)
1 1 -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*