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