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