From f1cf7b798305787d5d1272c13ead207e3e04a183 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Mon, 15 Oct 2012 13:25:56 +0700 Subject: [PATCH] t3070: disable unreliable fnmatch tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/t3070-wildmatch.sh | 86 ++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh index dbd3c8bc0c..dd95b00627 100755 --- a/t/t3070-wildmatch.sh +++ b/t/t3070-wildmatch.sh @@ -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 @@ -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*' @@ -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 '\' '[!\\]' -- 2.11.4.GIT