Skip to content

Commit

Permalink
vendor: Update gobwas/glob to fix question mark handling
Browse files Browse the repository at this point in the history
  • Loading branch information
calmh committed Oct 23, 2016
1 parent 7c37301 commit 4b3adfa
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
32 changes: 32 additions & 0 deletions lib/ignore/ignore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
14 changes: 3 additions & 11 deletions vendor/github.com/gobwas/glob/match/row.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
{
"importpath": "github.com/gobwas/glob",
"repository": "https://github.com/gobwas/glob",
"revision": "ce6abff51712df5da11095fb41dd4b0353559797",
"revision": "0354991b92587e2742549d3036f3b5bae5ab03f2",
"branch": "master",
"notests": true
},
Expand Down

0 comments on commit 4b3adfa

Please sign in to comment.