Skip to content

Commit

Permalink
t3070: disable unreliable fnmatch tests
Browse files Browse the repository at this point in the history
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 <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Oct 15, 2012
1 parent feabcc1 commit f1cf7b7
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions t/t3070-wildmatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ match 1 1 ten 't[a-g]n'
match 0 0 ten 't[!a-g]n'
match 1 1 ton 't[!a-g]n'
match 1 1 ton 't[^a-g]n'
match 1 1 'a]b' 'a[]]b'
match 1 1 a-b 'a[]-]b'
match 1 1 'a]b' 'a[]-]b'
match 0 0 aab 'a[]-]b'
match 1 1 aab 'a[]a-]b'
match 1 x 'a]b' 'a[]]b'
match 1 x a-b 'a[]-]b'
match 1 x 'a]b' 'a[]-]b'
match 0 x aab 'a[]-]b'
match 1 x aab 'a[]a-]b'
match 1 1 ']' ']'

# Extended slash-matching features
Expand All @@ -67,7 +67,7 @@ match 0 0 'foo/bar' 'foo[/]bar'
match 0 0 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
match 1 1 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
match 0 0 'foo' '**/foo'
match 1 1 '/foo' '**/foo'
match 1 x '/foo' '**/foo'
match 1 0 'bar/baz/foo' '**/foo'
match 0 0 'bar/baz/foo' '*/foo'
match 0 0 'foo/bar/baz' '**/bar*'
Expand All @@ -85,77 +85,77 @@ match 1 0 'deep/foo/bar/baz/x' '**/bar/*/*'
match 0 0 'acrt' 'a[c-c]st'
match 1 1 'acrt' 'a[c-c]rt'
match 0 0 ']' '[!]-]'
match 1 1 'a' '[!]-]'
match 1 x 'a' '[!]-]'
match 0 0 '' '\'
match 0 0 '\' '\'
match 0 0 '/\' '*/\'
match 1 1 '/\' '*/\\'
match 0 x '\' '\'
match 0 x '/\' '*/\'
match 1 x '/\' '*/\\'
match 1 1 'foo' 'foo'
match 1 1 '@foo' '@foo'
match 0 0 'foo' '@foo'
match 1 1 '[ab]' '\[ab]'
match 1 1 '[ab]' '[[]ab]'
match 1 1 '[ab]' '[[:]ab]'
match 0 0 '[ab]' '[[::]ab]'
match 1 1 '[ab]' '[[:digit]ab]'
match 1 1 '[ab]' '[\[:]ab]'
match 1 x '[ab]' '[[:]ab]'
match 0 x '[ab]' '[[::]ab]'
match 1 x '[ab]' '[[:digit]ab]'
match 1 x '[ab]' '[\[:]ab]'
match 1 1 '?a?b' '\??\?b'
match 1 1 'abc' '\a\b\c'
match 0 0 'foo' ''
match 1 0 'foo/bar/baz/to' '**/t[o]'

# Character class tests
match 1 1 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
match 0 0 'a' '[[:digit:][:upper:][:space:]]'
match 1 1 'A' '[[:digit:][:upper:][:space:]]'
match 1 0 '1' '[[:digit:][:upper:][:space:]]'
match 0 0 '1' '[[:digit:][:upper:][:spaci:]]'
match 1 1 ' ' '[[:digit:][:upper:][:space:]]'
match 0 0 '.' '[[:digit:][:upper:][:space:]]'
match 1 1 '.' '[[:digit:][:punct:][:space:]]'
match 1 x 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'
match 0 x 'a' '[[:digit:][:upper:][:space:]]'
match 1 x 'A' '[[:digit:][:upper:][:space:]]'
match 1 x '1' '[[:digit:][:upper:][:space:]]'
match 0 x '1' '[[:digit:][:upper:][:spaci:]]'
match 1 x ' ' '[[:digit:][:upper:][:space:]]'
match 0 x '.' '[[:digit:][:upper:][:space:]]'
match 1 x '.' '[[:digit:][:punct:][:space:]]'
match 1 1 '5' '[[:xdigit:]]'
match 1 1 'f' '[[:xdigit:]]'
match 1 1 'D' '[[:xdigit:]]'
match 1 0 '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
match 1 0 '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
match 1 1 '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
match 1 1 '5' '[a-c[:digit:]x-z]'
match 1 1 'b' '[a-c[:digit:]x-z]'
match 1 1 'y' '[a-c[:digit:]x-z]'
match 0 0 'q' '[a-c[:digit:]x-z]'
match 1 x '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
match 1 x '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
match 1 x '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
match 1 x '5' '[a-c[:digit:]x-z]'
match 1 x 'b' '[a-c[:digit:]x-z]'
match 1 x 'y' '[a-c[:digit:]x-z]'
match 0 x 'q' '[a-c[:digit:]x-z]'

# Additional tests, including some malformed wildmats
match 1 1 ']' '[\\-^]'
match 1 x ']' '[\\-^]'
match 0 0 '[' '[\\-^]'
match 1 1 '-' '[\-_]'
match 1 1 ']' '[\]]'
match 1 x '-' '[\-_]'
match 1 x ']' '[\]]'
match 0 0 '\]' '[\]]'
match 0 0 '\' '[\]]'
match 0 0 'ab' 'a[]b'
match 0 1 'a[]b' 'a[]b'
match 0 1 'ab[' 'ab['
match 0 x 'a[]b' 'a[]b'
match 0 x 'ab[' 'ab['
match 0 0 'ab' '[!'
match 0 0 'ab' '[-'
match 1 1 '-' '[-]'
match 0 0 '-' '[a-'
match 0 0 '-' '[!a-'
match 1 1 '-' '[--A]'
match 1 1 '5' '[--A]'
match 1 x '-' '[--A]'
match 1 x '5' '[--A]'
match 1 1 ' ' '[ --]'
match 1 1 '$' '[ --]'
match 1 1 '-' '[ --]'
match 0 0 '0' '[ --]'
match 1 1 '-' '[---]'
match 1 1 '-' '[------]'
match 1 x '-' '[---]'
match 1 x '-' '[------]'
match 0 0 'j' '[a-e-n]'
match 1 1 '-' '[a-e-n]'
match 1 1 'a' '[!------]'
match 1 x '-' '[a-e-n]'
match 1 x 'a' '[!------]'
match 0 0 '[' '[]-a]'
match 1 1 '^' '[]-a]'
match 1 x '^' '[]-a]'
match 0 0 '^' '[!]-a]'
match 1 1 '[' '[!]-a]'
match 1 x '[' '[!]-a]'
match 1 1 '^' '[a^bc]'
match 1 1 '-b]' '[a-]b]'
match 1 x '-b]' '[a-]b]'
match 0 0 '\' '[\]'
match 1 1 '\' '[\\]'
match 0 0 '\' '[!\\]'
Expand Down

0 comments on commit f1cf7b7

Please sign in to comment.