(c *C)
| 303 | } |
| 304 | |
| 305 | func (s *SuiteCommit) TestStringMultiLine(c *C) { |
| 306 | hash := plumbing.NewHash("e7d896db87294e33ca3202e536d4d9bb16023db3") |
| 307 | |
| 308 | f := fixtures.ByURL("https://github.com/src-d/go-git.git").One() |
| 309 | sto := filesystem.NewStorage(f.DotGit(), cache.NewObjectLRUDefault()) |
| 310 | |
| 311 | o, err := sto.EncodedObject(plumbing.CommitObject, hash) |
| 312 | c.Assert(err, IsNil) |
| 313 | commit, err := DecodeCommit(sto, o) |
| 314 | c.Assert(err, IsNil) |
| 315 | |
| 316 | c.Assert(commit.String(), Equals, ""+ |
| 317 | "commit e7d896db87294e33ca3202e536d4d9bb16023db3\n"+ |
| 318 | "Author: Alberto Cortés <alberto@sourced.tech>\n"+ |
| 319 | "Date: Wed Jan 27 11:13:49 2016 +0100\n"+ |
| 320 | "\n"+ |
| 321 | " fix zlib invalid header error\n"+ |
| 322 | "\n"+ |
| 323 | " The return value of reads to the packfile were being ignored, so zlib\n"+ |
| 324 | " was getting invalid data on it read buffers.\n"+ |
| 325 | "\n", |
| 326 | ) |
| 327 | } |
| 328 | |
| 329 | func (s *SuiteCommit) TestCommitIterNext(c *C) { |
| 330 | i := s.Commit.Parents() |
nothing calls this directly
no test coverage detected