(c *C)
| 355 | } |
| 356 | |
| 357 | func (s *SubmoduleSuite) TestRepositoryRelativeURLDeepTraversal(c *C) { |
| 358 | sm := newSubmoduleForRelativeURL(c, |
| 359 | "https://example.invalid/group/proj.git", "basic", "../../org/X.git") |
| 360 | |
| 361 | r, err := sm.Repository() |
| 362 | c.Assert(err, IsNil) |
| 363 | |
| 364 | remotes, err := r.Remotes() |
| 365 | c.Assert(err, IsNil) |
| 366 | c.Assert(remotes, HasLen, 1) |
| 367 | c.Assert(remotes[0].Config().URLs[0], Equals, |
| 368 | "https://example.invalid/org/X.git") |
| 369 | } |
| 370 | |
| 371 | func (s *SubmoduleSuite) TestRepositoryAbsoluteLocalURLPreserved(c *C) { |
| 372 | raw := "/abs/path/X.git" |
nothing calls this directly
no test coverage detected