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