build: Update to patched github.com/gobwas/glob (fixes #8386) (#8387)

The glob package has seen very little activity the last few years so I'm
not holding my breath on getting this merged.
This commit is contained in:
Jakob Borg
2022-06-15 21:49:15 +02:00
committed by GitHub
parent f7e30a9f10
commit 0e79b532cf
3 changed files with 35 additions and 5 deletions
+25
View File
@@ -1073,6 +1073,31 @@ func TestSpecialChars(t *testing.T) {
}
}
func TestIntlWildcards(t *testing.T) {
pats := New(fs.NewFilesystem(fs.FilesystemTypeBasic, "."), WithCache(true))
stignore := `1000春
200?春
300[0-9]春
400[0-9]?`
if err := pats.Parse(bytes.NewBufferString(stignore), ".stignore"); err != nil {
t.Fatal(err)
}
cases := []string{
"1000春",
"2002春",
"3003春",
"4004春",
}
for _, c := range cases {
if !pats.Match(c).IsIgnored() {
t.Errorf("%q should be ignored", c)
}
}
}
func TestPartialIncludeLine(t *testing.T) {
// Loading a partial #include line (no file mentioned) should error but not crash.