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 to
4 # succeed and if fnmatch works the same way as wildmat, respectively. After
5 # that is a text string for the match, and a pattern string. Strings can be
6 # quoted (if desired) 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
45 0 1 foo/bar f[^eiu][^eiu][^eiu][^eiu][^eiu]r
46 1 1 foo-bar f[^eiu][^eiu][^eiu][^eiu][^eiu]r
49 1 1 bar/baz/foo **/foo
51 0 0 foo/bar/baz **/bar*
52 1 1 deep/foo/bar/baz **/bar/*
53 0 1 deep/foo/bar/baz/ **/bar/*
54 1 1 deep/foo/bar/baz/ **/bar/**
55 0 1 deep/foo/bar **/bar/*
56 1 1 deep/foo/bar/ **/bar/**
57 1 1 foo/bar/baz **/bar**
58 1 1 foo/bar/baz/x */bar/**
59 0 0 deep/foo/bar/baz/x */bar/**
60 1 1 deep/foo/bar/baz/x **/bar/*/*
62 # Various additional tests
83 1 1 foo/bar/baz/to **/t[o]
85 # Character class tests
86 1 1 a1B [[:alpha:]][[:digit:]][[:upper:]]
87 0 1 a [[:digit:][:upper:][:space:]]
88 1 1 A [[:digit:][:upper:][:space:]]
89 1 1 1 [[:digit:][:upper:][:space:]]
90 0 1 1 [[:digit:][:upper:][:spaci:]]
91 1 1 ' ' [[:digit:][:upper:][:space:]]
92 0 1 . [[:digit:][:upper:][:space:]]
93 1 1 . [[:digit:][:punct:][:space:]]
97 1 1 _ [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
98 #1 1 … [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
99 1 1
\x7f [^[:alnum:][:alpha:][:blank:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
100 1 1 . [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]
101 1 1 5 [a-c[:digit:]x-z]
102 1 1 b [a-c[:digit:]x-z]
103 1 1 y [a-c[:digit:]x-z]
104 0 1 q [a-c[:digit:]x-z]
106 # Additional tests, including some malformed wildmats
158 # Test recursion and the abort code (use "wildtest -i" to see iteration counts)
159 1 1 -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
160 0 1 -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
161 0 1 -adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
162 1 1 /adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1 /*/*/*/*/*/*/12/*/*/*/m/*/*/*
163 0 1 /adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1 /*/*/*/*/*/*/12/*/*/*/m/*/*/*
164 1 1 abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt **/*a*b*g*n*t
165 0 1 abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz **/*a*b*g*n*t