xref: /freebsd/bin/sh/tests/builtins/case3.0 (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
1# Generated by ./test-fnmatch -s 2, do not edit.
2failures=
3failed() { printf '%s\n' "Failed: $1 '$2' '$3'"; failures=x$failures; }
4# We do not treat a backslash specially in this case,
5# but this is not the case in all shells.
6netestmatch() { case $2 in $1) ;; *) failed netestmatch "$@";; esac; }
7netestnomatch() { case $2 in $1) failed netestnomatch "$@";; esac; }
8netestmatch '' ''
9netestmatch 'a' 'a'
10netestnomatch 'a' 'b'
11netestnomatch 'a' 'A'
12netestmatch '*' 'a'
13netestmatch '*' 'aa'
14netestmatch '*a' 'a'
15netestnomatch '*a' 'b'
16netestnomatch '*a*' 'b'
17netestmatch '*a*b*' 'ab'
18netestmatch '*a*b*' 'qaqbq'
19netestmatch '*a*bb*' 'qaqbqbbq'
20netestmatch '*a*bc*' 'qaqbqbcq'
21netestmatch '*a*bb*' 'qaqbqbb'
22netestmatch '*a*bc*' 'qaqbqbc'
23netestmatch '*a*bb' 'qaqbqbb'
24netestmatch '*a*bc' 'qaqbqbc'
25netestnomatch '*a*bb' 'qaqbqbbq'
26netestnomatch '*a*bc' 'qaqbqbcq'
27netestnomatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaa'
28netestmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaa'
29netestmatch '*a*a*a*a*a*a*a*a*a*a*' 'aaaaaaaaaaa'
30netestnomatch '.*.*.*.*.*.*.*.*.*.*' '.........'
31netestmatch '.*.*.*.*.*.*.*.*.*.*' '..........'
32netestmatch '.*.*.*.*.*.*.*.*.*.*' '...........'
33netestnomatch '*?*?*?*?*?*?*?*?*?*?*' '123456789'
34netestnomatch '??????????*' '123456789'
35netestnomatch '*??????????' '123456789'
36netestmatch '*?*?*?*?*?*?*?*?*?*?*' '1234567890'
37netestmatch '??????????*' '1234567890'
38netestmatch '*??????????' '1234567890'
39netestmatch '*?*?*?*?*?*?*?*?*?*?*' '12345678901'
40netestmatch '??????????*' '12345678901'
41netestmatch '*??????????' '12345678901'
42netestmatch '[x]' 'x'
43netestmatch '[*]' '*'
44netestmatch '[?]' '?'
45netestmatch '[' '['
46netestmatch '[[]' '['
47netestnomatch '[[]' 'x'
48netestnomatch '[*]' ''
49netestnomatch '[*]' 'x'
50netestnomatch '[?]' 'x'
51netestmatch '*[*]*' 'foo*foo'
52netestnomatch '*[*]*' 'foo'
53netestmatch '[0-9]' '0'
54netestmatch '[0-9]' '5'
55netestmatch '[0-9]' '9'
56netestnomatch '[0-9]' '/'
57netestnomatch '[0-9]' ':'
58netestnomatch '[0-9]' '*'
59netestnomatch '[!0-9]' '0'
60netestnomatch '[!0-9]' '5'
61netestnomatch '[!0-9]' '9'
62netestmatch '[!0-9]' '/'
63netestmatch '[!0-9]' ':'
64netestmatch '[!0-9]' '*'
65netestmatch '*[0-9]' 'a0'
66netestmatch '*[0-9]' 'a5'
67netestmatch '*[0-9]' 'a9'
68netestnomatch '*[0-9]' 'a/'
69netestnomatch '*[0-9]' 'a:'
70netestnomatch '*[0-9]' 'a*'
71netestnomatch '*[!0-9]' 'a0'
72netestnomatch '*[!0-9]' 'a5'
73netestnomatch '*[!0-9]' 'a9'
74netestmatch '*[!0-9]' 'a/'
75netestmatch '*[!0-9]' 'a:'
76netestmatch '*[!0-9]' 'a*'
77netestmatch '*[0-9]' 'a00'
78netestmatch '*[0-9]' 'a55'
79netestmatch '*[0-9]' 'a99'
80netestmatch '*[0-9]' 'a0a0'
81netestmatch '*[0-9]' 'a5a5'
82netestmatch '*[0-9]' 'a9a9'
83netestmatch '\*' '\*'
84netestmatch '\?' '\?'
85netestmatch '\' '\'
86netestnomatch '\\' '\'
87netestmatch '\\' '\\'
88netestmatch '*\*' 'foo\foo'
89netestnomatch '*\*' 'foo'
90netestmatch '.*' '.'
91netestmatch '.*' '..'
92netestmatch '.*' '.a'
93netestmatch 'a*' 'a.'
94[ -z "$failures" ]
95