]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ab/wildmatch-glob-slash-test'
authorJunio C Hamano <gitster@pobox.com>
Sat, 24 Jun 2017 21:28:37 +0000 (14:28 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 24 Jun 2017 21:28:37 +0000 (14:28 -0700)
A new test to show the interaction between the pattern [^a-z]
(which matches '/') and a slash in a path has been added.  The
pattern should not match the slash with "pathmatch", but should
with "wildmatch".

* ab/wildmatch-glob-slash-test:
  wildmatch test: cover a blind spot in "/" matching

t/t3070-wildmatch.sh

index 7ca69f4bed6438009808f35c2e212b269bffcfb0..8fd70d3aa25f05593826ff9a788c7935b0925ef8 100755 (executable)
@@ -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 '*/*/*'