MCPcopy Create free account
hub / github.com/go-git/go-git / TestMatchAny

Method TestMatchAny

config/refspec_test.go:193–202  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

191}
192
193func (s *RefSpecSuite) TestMatchAny(c *C) {
194 specs := []RefSpec{
195 "refs/heads/bar:refs/remotes/origin/foo",
196 "refs/heads/foo:refs/remotes/origin/bar",
197 }
198
199 c.Assert(MatchAny(specs, plumbing.ReferenceName("refs/heads/foo")), Equals, true)
200 c.Assert(MatchAny(specs, plumbing.ReferenceName("refs/heads/bar")), Equals, true)
201 c.Assert(MatchAny(specs, plumbing.ReferenceName("refs/heads/master")), Equals, false)
202}

Callers

nothing calls this directly

Calls 2

ReferenceNameTypeAlias · 0.92
MatchAnyFunction · 0.85

Tested by

no test coverage detected