MCPcopy Index your code
hub / github.com/go-git/go-git / TestMalformedHeader

Method TestMalformedHeader

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

Source from the content-addressed store, hash-verified

733}
734
735func (s *SuiteCommit) TestMalformedHeader(c *C) {
736 encoded := &plumbing.MemoryObject{}
737 decoded := &Commit{}
738 commit := *s.Commit
739
740 commit.PGPSignature = "\n"
741 commit.Author.Name = "\n"
742 commit.Author.Email = "\n"
743 commit.Committer.Name = "\n"
744 commit.Committer.Email = "\n"
745
746 err := commit.Encode(encoded)
747 c.Assert(err, IsNil)
748
749 err = decoded.Decode(encoded)
750 c.Assert(err, IsNil)
751}
752
753func (s *SuiteCommit) TestEncodeWithoutSignature(c *C) {
754 tests := []struct {

Callers

nothing calls this directly

Calls 2

DecodeMethod · 0.95
EncodeMethod · 0.65

Tested by

no test coverage detected