(c *C, fs billy.Filesystem, dir *DotGit)
| 615 | } |
| 616 | |
| 617 | func testObjectsWithPrefix(c *C, fs billy.Filesystem, dir *DotGit) { |
| 618 | prefix, _ := hex.DecodeString("01d5") |
| 619 | hashes, err := dir.ObjectsWithPrefix(prefix) |
| 620 | c.Assert(err, IsNil) |
| 621 | c.Assert(hashes, HasLen, 1) |
| 622 | c.Assert(hashes[0].String(), Equals, "01d5fa556c33743006de7e76e67a2dfcd994ca04") |
| 623 | |
| 624 | // Empty prefix should yield all objects. |
| 625 | // (subset of testObjects) |
| 626 | hashes, err = dir.ObjectsWithPrefix(nil) |
| 627 | c.Assert(err, IsNil) |
| 628 | c.Assert(hashes, HasLen, 187) |
| 629 | } |
| 630 | |
| 631 | func (s *SuiteDotGit) TestObjectsNoFolder(c *C) { |
| 632 | fs, clean := s.TemporalFilesystem() |
no test coverage detected