Silence some compiler warnings on HP-UX.
[rsync/rsync.git] / wildtest.txt
CommitLineData
97d53f8c
WD
1# Input is in the following format (all items white-space separated):
2#
85b80fbc
WD
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.
97d53f8c
WD
7#
8# MATCH FNMATCH_SAME "text to match" 'pattern to use'
9
10# Basic wildmat features
111 1 foo foo
120 1 foo bar
131 1 '' ""
141 1 foo ???
150 1 foo ??
161 1 foo *
171 1 foo f*
180 1 foo *f
191 1 foo *foo*
201 1 foobar *ob*a*r*
211 1 aaaaaaabababab *ab
221 1 foo* foo\*
230 1 foobar foo\*bar
241 1 f\oo f\\oo
251 1 ball *[al]?
260 1 ten [ten]
271 1 ten **[!te]
280 1 ten **[!ten]
291 1 ten t[a-g]n
300 1 ten t[!a-g]n
311 1 ton t[!a-g]n
321 1 ton t[^a-g]n
331 1 a]b a[]]b
341 1 a-b a[]-]b
351 1 a]b a[]-]b
360 1 aab a[]-]b
371 1 aab a[]a-]b
381 1 ] ]
39
40# Extended slash-matching features
410 1 foo/baz/bar foo*bar
421 1 foo/baz/bar foo**bar
430 1 foo/bar foo?bar
441 0 foo/bar foo[/]bar
450 1 foo **/foo
461 1 /foo **/foo
471 1 bar/baz/foo **/foo
480 1 bar/baz/foo */foo
490 0 foo/bar/baz **/bar*
85b80fbc 501 1 deep/foo/bar/baz **/bar/*
97d53f8c 511 1 foo/bar/baz **/bar**
85b80fbc
WD
521 1 foo/bar/baz/x */bar/**
530 0 deep/foo/bar/baz/x */bar/**
541 1 deep/foo/bar/baz/x **/bar/*/*
97d53f8c
WD
55
56# Various additional tests
570 1 acrt a[c-c]st
85b80fbc 581 1 acrt a[c-c]rt
97d53f8c
WD
590 1 ] [!]-]
601 1 a [!]-]
610 1 '' \
620 1 \ \
85b80fbc
WD
630 1 /\ */\
641 1 /\ */\\
97d53f8c
WD
651 1 foo foo
661 1 @foo @foo
670 1 foo @foo
681 1 [ab] \[ab]
85b80fbc
WD
691 1 [ab] [[]ab]
701 1 [ab] [[:]ab]
710 1 [ab] [[::]ab]
721 1 [ab] [[:digit]ab]
731 1 [ab] [\[:]ab]
97d53f8c
WD
741 1 ?a?b \??\?b
751 1 abc \a\b\c
760 1 foo ''
771 1 foo/bar/baz/to **/t[o]
78
79# Character class tests
801 1 a1B [[:alpha:]][[:digit:]][[:upper:]]
810 1 a [[:digit:][:upper:][:space:]]
821 1 A [[:digit:][:upper:][:space:]]
831 1 1 [[:digit:][:upper:][:space:]]
85b80fbc 840 1 1 [[:digit:][:upper:][:spaci:]]
97d53f8c
WD
851 1 ' ' [[:digit:][:upper:][:space:]]
860 1 . [[:digit:][:upper:][:space:]]
15bb997d 871 1 . [[:digit:][:punct:][:space:]]
97d53f8c
WD
881 1 5 [[:xdigit:]]
891 1 f [[:xdigit:]]
901 1 D [[:xdigit:]]
15bb997d
WD
911 1 _ [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]
92