git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] wildmatch test: cover a blind spot in "/" matching

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 27, 2017, 09:13 UTC
Message-ID
<0102015c492e27c6-669f7ca8-e7c6-484f-9c5b-7cb9358ee966-000000@eu-west-1.amazonses.com>

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
Next: Ævar Arnfjörð Bjarmason
Message 1 of 5 in “wildmatch test: cover a blind spot in "/" matching”
  1. wildmatch test: cover a blind spot in "/" matchingÆvar Arnfjörð Bjarmason, May 27, 2017
  2. Ævar Arnfjörð BjarmasonJun 9, 2017
  3. Junio C HamanoJun 10, 2017
  4. Junio C HamanoJun 10, 2017
  5. Ævar Arnfjörð BjarmasonJun 10, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.