vendor: Update gobwas/glob to fix question mark handling
This commit is contained in:
@@ -769,3 +769,35 @@ func TestIssue3674(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGobwasGlobIssue18(t *testing.T) {
|
||||
stignore := `
|
||||
a?b
|
||||
bb?
|
||||
`
|
||||
|
||||
testcases := []struct {
|
||||
file string
|
||||
matches bool
|
||||
}{
|
||||
{"ab", false},
|
||||
{"acb", true},
|
||||
{"asdb", false},
|
||||
{"bb", false},
|
||||
{"bba", true},
|
||||
{"bbaa", false},
|
||||
}
|
||||
|
||||
pats := New(true)
|
||||
err := pats.Parse(bytes.NewBufferString(stignore), ".stignore")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
for _, tc := range testcases {
|
||||
res := pats.Match(tc.file).IsIgnored()
|
||||
if res != tc.matches {
|
||||
t.Errorf("Matches(%q) == %v, expected %v", tc.file, res, tc.matches)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user