blob: 731104256edaa6f1383edf358032e0b7f4180bbd (
plain) (
tree)
|
|
package gitignore
import (
. "gopkg.in/check.v1"
)
func (s *MatcherSuite) TestMatcher_Match(c *C) {
ps := []Pattern{
ParsePattern("**/middle/v[uo]l?ano", nil),
ParsePattern("!volcano", nil),
}
m := NewMatcher(ps)
c.Assert(m.Match([]string{"head", "middle", "vulkano"}, false), Equals, true)
c.Assert(m.Match([]string{"head", "middle", "volcano"}, false), Equals, false)
}
|