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 1 1 foo/bar/baz **/bar**
54 1 1 foo/bar/baz/x */bar/**
55 0 0 deep/foo/bar/baz/x */bar/**
56 1 1 deep/foo/bar/baz/x **/bar/*/*
58 # Various additional tests
79 1 1 foo/bar/baz/to **/t[o]
81 # Character class tests
82 1 1 a1B [[:alpha:]][[:digit:]][[:upper:]]
83 0 1 a [[:digit:][:upper:][:space:]]
84 1 1 A [[:digit:][:upper:][:space:]]
85 1 1 1 [[:digit:][:upper:][:space:]]
86 0 1 1 [[:digit:][:upper:][:spaci:]]
87 1 1 ' ' [[:digit:][:upper:][:space:]]
88 0 1 . [[:digit:][:upper:][:space:]]
89 1 1 . [[:digit:][:punct:][:space:]]
93 1 1 _ [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
94 #1 1 … [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
95 1 1
\x7f [^[:alnum:][:alpha:][:blank:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
96 1 1 . [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]
97 1 1 5 [a-c[:digit:]x-z]
98 1 1 b [a-c[:digit:]x-z]
99 1 1 y [a-c[:digit:]x-z]
100 0 1 q [a-c[:digit:]x-z]
102 # Additional tests, including some malformed wildmats
154 # Test recursion and the abort code (use "wildtest -i" to see iteration counts)
155 1 1 -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
156 0 1 -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
157 0 1 -adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1 -*-*-*-*-*-*-12-*-*-*-m-*-*-*
158 1 1 /adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1 /*/*/*/*/*/*/12/*/*/*/m/*/*/*
159 0 1 /adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1 /*/*/*/*/*/*/12/*/*/*/m/*/*/*
160 1 1 abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt **/*a*b*g*n*t
161 0 1 abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz **/*a*b*g*n*t