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