(c *C)
| 90 | } |
| 91 | |
| 92 | func (s *RefSpecSuite) TestRefSpecMatch(c *C) { |
| 93 | spec := RefSpec("refs/heads/master:refs/remotes/origin/master") |
| 94 | c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/foo")), Equals, false) |
| 95 | c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/master")), Equals, true) |
| 96 | |
| 97 | spec = RefSpec("+refs/heads/master:refs/remotes/origin/master") |
| 98 | c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/foo")), Equals, false) |
| 99 | c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/master")), Equals, true) |
| 100 | |
| 101 | spec = RefSpec(":refs/heads/master") |
| 102 | c.Assert(spec.Match(plumbing.ReferenceName("")), Equals, true) |
| 103 | c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/master")), Equals, false) |
| 104 | |
| 105 | spec = RefSpec("refs/heads/love+hate:heads/love+hate") |
| 106 | c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/love+hate")), Equals, true) |
| 107 | |
| 108 | spec = RefSpec("+refs/heads/love+hate:heads/love+hate") |
| 109 | c.Assert(spec.Match(plumbing.ReferenceName("refs/heads/love+hate")), Equals, true) |
| 110 | } |
| 111 | |
| 112 | func (s *RefSpecSuite) TestRefSpecMatchGlob(c *C) { |
| 113 | tests := map[string]map[string]bool{ |
nothing calls this directly
no test coverage detected