git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wildmatch test: cover a blind spot in "/" matching
@ 2017-05-27  9:13 Ævar Arnfjörð Bjarmason
  2017-06-09 16:21 ` Ævar Arnfjörð Bjarmason
  2017-06-10  1:55 ` Junio C Hamano
  0 siblings, 2 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2017-05-27  9:13 UTC (permalink / raw)
  To: git

Add a test which covers a blindspot in how these tests should assert
that negated character classes are allowed or not allowed to match "/"
in certain circumstances.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t3070-wildmatch.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh
index ef509df35160..65ea07b68356 100755
--- a/t/t3070-wildmatch.sh
+++ b/t/t3070-wildmatch.sh
@@ -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'
@@ -226,6 +227,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 '*/*/*'

--
https://github.com/git/git/pull/362

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-10 11:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-27  9:13 [PATCH] wildmatch test: cover a blind spot in "/" matching Ævar Arnfjörð Bjarmason
2017-06-09 16:21 ` Ævar Arnfjörð Bjarmason
2017-06-10  1:55 ` Junio C Hamano
2017-06-10  1:57   ` Junio C Hamano
2017-06-10 11:31     ` Ævar Arnfjörð Bjarmason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).