(c *C)
| 38 | } |
| 39 | |
| 40 | func (s *CommitStatsSuite) TestStats_RootCommit(c *C) { |
| 41 | r, hash := s.writeHistory(c, []byte("foo\n")) |
| 42 | |
| 43 | aCommit, err := r.CommitObject(hash) |
| 44 | c.Assert(err, IsNil) |
| 45 | |
| 46 | fileStats, err := aCommit.Stats() |
| 47 | c.Assert(err, IsNil) |
| 48 | |
| 49 | c.Assert(fileStats, HasLen, 1) |
| 50 | c.Assert(fileStats[0].Name, Equals, "foo") |
| 51 | c.Assert(fileStats[0].Addition, Equals, 1) |
| 52 | c.Assert(fileStats[0].Deletion, Equals, 0) |
| 53 | c.Assert(fileStats[0].String(), Equals, " foo | 1 +\n") |
| 54 | } |
| 55 | |
| 56 | func (s *CommitStatsSuite) TestStats_WithoutNewLine(c *C) { |
| 57 | r, hash := s.writeHistory(c, []byte("foo\nbar"), []byte("foo\nbar\n")) |
nothing calls this directly
no test coverage detected