| 73 | } |
| 74 | |
| 75 | func (s *RefSpecSuite) TestRefSpecSrc(c *C) { |
| 76 | spec := RefSpec("refs/heads/*:refs/remotes/origin/*") |
| 77 | c.Assert(spec.Src(), Equals, "refs/heads/*") |
| 78 | |
| 79 | spec = RefSpec("+refs/heads/*:refs/remotes/origin/*") |
| 80 | c.Assert(spec.Src(), Equals, "refs/heads/*") |
| 81 | |
| 82 | spec = RefSpec(":refs/heads/master") |
| 83 | c.Assert(spec.Src(), Equals, "") |
| 84 | |
| 85 | spec = RefSpec("refs/heads/love+hate:refs/heads/love+hate") |
| 86 | c.Assert(spec.Src(), Equals, "refs/heads/love+hate") |
| 87 | |
| 88 | spec = RefSpec("+refs/heads/love+hate:refs/heads/love+hate") |
| 89 | c.Assert(spec.Src(), Equals, "refs/heads/love+hate") |
| 90 | } |
| 91 | |
| 92 | func (s *RefSpecSuite) TestRefSpecMatch(c *C) { |
| 93 | spec := RefSpec("refs/heads/master:refs/remotes/origin/master") |