1 # Input is in the following format (all items white-space separated):
3 # The first two items are 1 or 0 indicating if the wildmat call is expected
4 # to succeed and if fnmatch works the same way as wildmat, respectively.
5 # After that is a text string for the match, and a pattern string. Strings
6 # can be quoted in either double or single quotes, as well as backticks.
8 # MATCH FNMATCH_SAME "text to match" 'pattern to use'
10 # Basic wildmat features
21 1 1 aaaaaaabababab *ab
40 # Extended slash-matching features
41 0 1 foo/baz/bar foo*bar
42 1 1 foo/baz/bar foo**bar
47 1 1 bar/baz/foo **/foo
49 0 0 foo/bar/baz **/bar*
50 1 1 foo/bar/baz **/bar**
52 # Various additional tests
65 1 1 foo/bar/baz/to **/t[o]
67 # Character class tests
68 1 1 a1B [[:alpha:]][[:digit:]][[:upper:]]
69 0 1 a [[:digit:][:upper:][:space:]]
70 1 1 A [[:digit:][:upper:][:space:]]
71 1 1 1 [[:digit:][:upper:][:space:]]
72 0 1 1 [[:digit:][:upper:][:spack:]]
73 1 1 ' ' [[:digit:][:upper:][:space:]]
74 0 1 . [[:digit:][:upper:][:space:]]
75 1 1 . [[:digit:][:punct:][:space:]]
79 1 1 _ [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
80 1 1
\85 [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
81 1 1
\7f [^[:alnum:][:alpha:][:blank:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
82 1 1 . [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]
84 # Additional tests, including some malformed wildmats
132 # Test recursion and the abort code (use "wildtest -i" to see iteration counts)
133 1 1 -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
134 0 1 -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
135 0 1 -adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
136 1 1 /adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1 /*/*/*/*/*/*/12/*/*/*/m/*/*/*
137 0 1 /adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1 /*/*/*/*/*/*/12/*/*/*/m/*/*/*
138 1 1 abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt **/*a*b*g*n*t
139 0 1 abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz **/*a*b*g*n*t