Skip to content

Commit f1cf7b7

Browse files
pcloudsgitster
authored andcommitted
t3070: disable unreliable fnmatch tests
These tests show different results on different fnmatch() versions. We don't want to test fnmatch here. We want to make sure wildmatch behavior matches fnmatch and that only makes sense in cases when fnmatch() behaves consistently. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent feabcc1 commit f1cf7b7

File tree

1 file changed

+43
-43
lines changed

1 file changed

+43
-43
lines changed

t/t3070-wildmatch.sh

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ match 1 1 ten 't[a-g]n'
5252
match 0 0 ten 't[!a-g]n'
5353
match 1 1 ton 't[!a-g]n'
5454
match 1 1 ton 't[^a-g]n'
55-
match 1 1 'a]b' 'a[]]b'
56-
match 1 1 a-b 'a[]-]b'
57-
match 1 1 'a]b' 'a[]-]b'
58-
match 0 0 aab 'a[]-]b'
59-
match 1 1 aab 'a[]a-]b'
55+
match 1 x 'a]b' 'a[]]b'
56+
match 1 x a-b 'a[]-]b'
57+
match 1 x 'a]b' 'a[]-]b'
58+
match 0 x aab 'a[]-]b'
59+
match 1 x aab 'a[]a-]b'
6060
match 1 1 ']' ']'
6161

6262
# Extended slash-matching features
@@ -67,7 +67,7 @@ match 0 0 'foo/bar' 'foo[/]bar'
6767
match 0 0 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
6868
match 1 1 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
6969
match 0 0 'foo' '**/foo'
70-
match 1 1 '/foo' '**/foo'
70+
match 1 x '/foo' '**/foo'
7171
match 1 0 'bar/baz/foo' '**/foo'
7272
match 0 0 'bar/baz/foo' '*/foo'
7373
match 0 0 'foo/bar/baz' '**/bar*'
@@ -85,77 +85,77 @@ match 1 0 'deep/foo/bar/baz/x' '**/bar/*/*'
8585
match 0 0 'acrt' 'a[c-c]st'
8686
match 1 1 'acrt' 'a[c-c]rt'
8787
match 0 0 ']' '[!]-]'
88-
match 1 1 'a' '[!]-]'
88+
match 1 x 'a' '[!]-]'
8989
match 0 0 '' '\'
90-
match 0 0 '\' '\'
91-
match 0 0 '/\' '*/\'
92-
match 1 1 '/\' '*/\\'
90+
match 0 x '\' '\'
91+
match 0 x '/\' '*/\'
92+
match 1 x '/\' '*/\\'
9393
match 1 1 'foo' 'foo'
9494
match 1 1 '@foo' '@foo'
9595
match 0 0 'foo' '@foo'
9696
match 1 1 '[ab]' '\[ab]'
9797
match 1 1 '[ab]' '[[]ab]'
98-
match 1 1 '[ab]' '[[:]ab]'
99-
match 0 0 '[ab]' '[[::]ab]'
100-
match 1 1 '[ab]' '[[:digit]ab]'
101-
match 1 1 '[ab]' '[\[:]ab]'
98+
match 1 x '[ab]' '[[:]ab]'
99+
match 0 x '[ab]' '[[::]ab]'
100+
match 1 x '[ab]' '[[:digit]ab]'
101+
match 1 x '[ab]' '[\[:]ab]'
102102
match 1 1 '?a?b' '\??\?b'
103103
match 1 1 'abc' '\a\b\c'
104104
match 0 0 'foo' ''
105105
match 1 0 'foo/bar/baz/to' '**/t[o]'
106106

107107
# Character class tests
108-
match 1 1 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
109-
match 0 0 'a' '[[:digit:][:upper:][:space:]]'
110-
match 1 1 'A' '[[:digit:][:upper:][:space:]]'
111-
match 1 0 '1' '[[:digit:][:upper:][:space:]]'
112-
match 0 0 '1' '[[:digit:][:upper:][:spaci:]]'
113-
match 1 1 ' ' '[[:digit:][:upper:][:space:]]'
114-
match 0 0 '.' '[[:digit:][:upper:][:space:]]'
115-
match 1 1 '.' '[[:digit:][:punct:][:space:]]'
108+
match 1 x 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
109+
match 0 x 'a' '[[:digit:][:upper:][:space:]]'
110+
match 1 x 'A' '[[:digit:][:upper:][:space:]]'
111+
match 1 x '1' '[[:digit:][:upper:][:space:]]'
112+
match 0 x '1' '[[:digit:][:upper:][:spaci:]]'
113+
match 1 x ' ' '[[:digit:][:upper:][:space:]]'
114+
match 0 x '.' '[[:digit:][:upper:][:space:]]'
115+
match 1 x '.' '[[:digit:][:punct:][:space:]]'
116116
match 1 1 '5' '[[:xdigit:]]'
117117
match 1 1 'f' '[[:xdigit:]]'
118118
match 1 1 'D' '[[:xdigit:]]'
119-
match 1 0 '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
120-
match 1 0 '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
121-
match 1 1 '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
122-
match 1 1 '5' '[a-c[:digit:]x-z]'
123-
match 1 1 'b' '[a-c[:digit:]x-z]'
124-
match 1 1 'y' '[a-c[:digit:]x-z]'
125-
match 0 0 'q' '[a-c[:digit:]x-z]'
119+
match 1 x '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
120+
match 1 x '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
121+
match 1 x '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
122+
match 1 x '5' '[a-c[:digit:]x-z]'
123+
match 1 x 'b' '[a-c[:digit:]x-z]'
124+
match 1 x 'y' '[a-c[:digit:]x-z]'
125+
match 0 x 'q' '[a-c[:digit:]x-z]'
126126

127127
# Additional tests, including some malformed wildmats
128-
match 1 1 ']' '[\\-^]'
128+
match 1 x ']' '[\\-^]'
129129
match 0 0 '[' '[\\-^]'
130-
match 1 1 '-' '[\-_]'
131-
match 1 1 ']' '[\]]'
130+
match 1 x '-' '[\-_]'
131+
match 1 x ']' '[\]]'
132132
match 0 0 '\]' '[\]]'
133133
match 0 0 '\' '[\]]'
134134
match 0 0 'ab' 'a[]b'
135-
match 0 1 'a[]b' 'a[]b'
136-
match 0 1 'ab[' 'ab['
135+
match 0 x 'a[]b' 'a[]b'
136+
match 0 x 'ab[' 'ab['
137137
match 0 0 'ab' '[!'
138138
match 0 0 'ab' '[-'
139139
match 1 1 '-' '[-]'
140140
match 0 0 '-' '[a-'
141141
match 0 0 '-' '[!a-'
142-
match 1 1 '-' '[--A]'
143-
match 1 1 '5' '[--A]'
142+
match 1 x '-' '[--A]'
143+
match 1 x '5' '[--A]'
144144
match 1 1 ' ' '[ --]'
145145
match 1 1 '$' '[ --]'
146146
match 1 1 '-' '[ --]'
147147
match 0 0 '0' '[ --]'
148-
match 1 1 '-' '[---]'
149-
match 1 1 '-' '[------]'
148+
match 1 x '-' '[---]'
149+
match 1 x '-' '[------]'
150150
match 0 0 'j' '[a-e-n]'
151-
match 1 1 '-' '[a-e-n]'
152-
match 1 1 'a' '[!------]'
151+
match 1 x '-' '[a-e-n]'
152+
match 1 x 'a' '[!------]'
153153
match 0 0 '[' '[]-a]'
154-
match 1 1 '^' '[]-a]'
154+
match 1 x '^' '[]-a]'
155155
match 0 0 '^' '[!]-a]'
156-
match 1 1 '[' '[!]-a]'
156+
match 1 x '[' '[!]-a]'
157157
match 1 1 '^' '[a^bc]'
158-
match 1 1 '-b]' '[a-]b]'
158+
match 1 x '-b]' '[a-]b]'
159159
match 0 0 '\' '[\]'
160160
match 1 1 '\' '[\\]'
161161
match 0 0 '\' '[!\\]'

0 commit comments

Comments
 (0)