mirror of
https://github.com/git/git.git
synced 2024-12-01 05:54:16 +08:00
wildmatch test: cover a blind spot in "/" matching
A negated character class that does not include '/', e.g. [^a-z]: - Should match '/' when doing "wildmatch" - Should not match '/' when doing "pathmatch" Add two tests to cover these cases. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
44e2ff09ce
commit
d8604c747b
@ -82,6 +82,7 @@ match 1 0 'foo/bar' 'foo/**/bar'
|
||||
match 1 0 'foo/bar' 'foo/**/**/bar'
|
||||
match 0 0 'foo/bar' 'foo?bar'
|
||||
match 0 0 'foo/bar' 'foo[/]bar'
|
||||
match 0 0 'foo/bar' 'foo[^a-z]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 1 0 'foo' '**/foo'
|
||||
@ -225,6 +226,7 @@ pathmatch 0 foo/bba/arr 'foo/*z'
|
||||
pathmatch 0 foo/bba/arr 'foo/**z'
|
||||
pathmatch 1 foo/bar 'foo?bar'
|
||||
pathmatch 1 foo/bar 'foo[/]bar'
|
||||
pathmatch 1 foo/bar 'foo[^a-z]bar'
|
||||
pathmatch 0 foo '*/*/*'
|
||||
pathmatch 0 foo/bar '*/*/*'
|
||||
pathmatch 1 foo/bba/arr '*/*/*'
|
||||
|
Loading…
Reference in New Issue
Block a user