diff options
author | Sunny <me@darkowlzz.space> | 2017-10-12 00:31:16 +0530 |
---|---|---|
committer | Sunny <me@darkowlzz.space> | 2017-11-02 18:50:20 +0530 |
commit | 11162e11c830fec51517d86835a884a5547a4f16 (patch) | |
tree | deebf535929ed9d2fe3c14d425d4dbb0d6e66c0e /plumbing/object/commit_test.go | |
parent | 69b72d30b125b07f69f2b1f53c44b273d7cb4da9 (diff) | |
download | go-git-11162e11c830fec51517d86835a884a5547a4f16.tar.gz |
Add Stats() to Patch and fix diffstat output
Diffstat (limited to 'plumbing/object/commit_test.go')
-rw-r--r-- | plumbing/object/commit_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plumbing/object/commit_test.go b/plumbing/object/commit_test.go index f17f1c6..e84160b 100644 --- a/plumbing/object/commit_test.go +++ b/plumbing/object/commit_test.go @@ -267,7 +267,7 @@ func (s *SuiteCommit) TestStat(c *C) { c.Assert(fileStats[0].Name, Equals, "vendor/foo.go") c.Assert(fileStats[0].Addition, Equals, 7) c.Assert(fileStats[0].Deletion, Equals, 0) - c.Assert(fileStats[0].String(), Equals, " vendor/foo.go | 7 +++++++") + c.Assert(fileStats[0].String(), Equals, " vendor/foo.go | 7 +++++++\n") // Stats for another commit. aCommit = s.commit(c, plumbing.NewHash("918c48b83bd081e863dbe1b80f8998f058cd8294")) @@ -277,8 +277,10 @@ func (s *SuiteCommit) TestStat(c *C) { c.Assert(fileStats[0].Name, Equals, "go/example.go") c.Assert(fileStats[0].Addition, Equals, 142) c.Assert(fileStats[0].Deletion, Equals, 0) + c.Assert(fileStats[0].String(), Equals, " go/example.go | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++\n") c.Assert(fileStats[1].Name, Equals, "php/crappy.php") c.Assert(fileStats[1].Addition, Equals, 259) c.Assert(fileStats[1].Deletion, Equals, 0) + c.Assert(fileStats[1].String(), Equals, " php/crappy.php | 259 ++++++++++++++++++++++++++++++++++++++++++++++++++++\n") } |