(c *C)
| 348 | } |
| 349 | |
| 350 | func (s *SuiteCommit) TestStringMultiLine(c *C) { |
| 351 | hash := plumbing.NewHash("e7d896db87294e33ca3202e536d4d9bb16023db3") |
| 352 | |
| 353 | f := fixtures.ByURL("https://github.com/src-d/go-git.git").One() |
| 354 | sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault()) |
| 355 | |
| 356 | o, err := sto.EncodedObject(plumbing.CommitObject, hash) |
| 357 | c.Assert(err, IsNil) |
| 358 | commit, err := DecodeCommit(sto, o) |
| 359 | c.Assert(err, IsNil) |
| 360 | |
| 361 | c.Assert(commit.String(), Equals, ""+ |
| 362 | "commit e7d896db87294e33ca3202e536d4d9bb16023db3\n"+ |
| 363 | "Author: Alberto Cortés <alberto@sourced.tech>\n"+ |
| 364 | "Date: Wed Jan 27 11:13:49 2016 +0100\n"+ |
| 365 | "\n"+ |
| 366 | " fix zlib invalid header error\n"+ |
| 367 | "\n"+ |
| 368 | " The return value of reads to the packfile were being ignored, so zlib\n"+ |
| 369 | " was getting invalid data on it read buffers.\n"+ |
| 370 | "\n", |
| 371 | ) |
| 372 | } |
| 373 | |
| 374 | func (s *SuiteCommit) TestCommitIterNext(c *C) { |
| 375 | i := s.Commit.Parents() |
nothing calls this directly
no test coverage detected