(c *C)
| 16 | var _ = Suite(&PatchSuite{}) |
| 17 | |
| 18 | func (s *PatchSuite) TestStatsWithSubmodules(c *C) { |
| 19 | storer := filesystem.NewStorage( |
| 20 | fixtures.ByURL("https://github.com/git-fixtures/submodule.git").One().DotGit(), cache.NewObjectLRUDefault()) |
| 21 | |
| 22 | commit, err := GetCommit(storer, plumbing.NewHash("b685400c1f9316f350965a5993d350bc746b0bf4")) |
| 23 | c.Assert(err, IsNil) |
| 24 | |
| 25 | tree, err := commit.Tree() |
| 26 | c.Assert(err, IsNil) |
| 27 | |
| 28 | e, err := tree.entry("basic") |
| 29 | c.Assert(err, IsNil) |
| 30 | |
| 31 | ch := &Change{ |
| 32 | From: ChangeEntry{ |
| 33 | Name: "basic", |
| 34 | Tree: tree, |
| 35 | TreeEntry: *e, |
| 36 | }, |
| 37 | To: ChangeEntry{ |
| 38 | Name: "basic", |
| 39 | Tree: tree, |
| 40 | TreeEntry: *e, |
| 41 | }, |
| 42 | } |
| 43 | |
| 44 | p, err := getPatch("", ch) |
| 45 | c.Assert(err, IsNil) |
| 46 | c.Assert(p, NotNil) |
| 47 | } |
| 48 | |
| 49 | func (s *PatchSuite) TestFileStatsString(c *C) { |
| 50 | testCases := []struct { |
nothing calls this directly
no test coverage detected