MCPcopy Create free account
hub / github.com/go-git/go-git / TestMalformedHeader

Method TestMalformedHeader

plumbing/object/commit_test.go:518–534  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

516}
517
518func (s *SuiteCommit) TestMalformedHeader(c *C) {
519 encoded := &plumbing.MemoryObject{}
520 decoded := &Commit{}
521 commit := *s.Commit
522
523 commit.PGPSignature = "\n"
524 commit.Author.Name = "\n"
525 commit.Author.Email = "\n"
526 commit.Committer.Name = "\n"
527 commit.Committer.Email = "\n"
528
529 err := commit.Encode(encoded)
530 c.Assert(err, IsNil)
531
532 err = decoded.Decode(encoded)
533 c.Assert(err, IsNil)
534}
535
536func (s *SuiteCommit) TestEncodeWithoutSignature(c *C) {
537 // Similar to TestString since no signature

Callers

nothing calls this directly

Calls 2

DecodeMethod · 0.95
EncodeMethod · 0.65

Tested by

no test coverage detected