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

Method TestReadCorruptZLib

plumbing/format/objfile/reader_test.go:59–67  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

57}
58
59func (s *SuiteReader) TestReadCorruptZLib(c *C) {
60 data, _ := base64.StdEncoding.DecodeString("eAFLysaalPUjBgAAAJsAHw")
61 source := bytes.NewReader(data)
62 r, err := NewReader(source)
63 c.Assert(err, IsNil)
64
65 _, _, err = r.Header()
66 c.Assert(err, NotNil)
67}
68
69func (s *SuiteReader) TestReaderReadBeforeHeader(c *C) {
70 data, _ := base64.StdEncoding.DecodeString(objfileFixtures[0].data)

Callers

nothing calls this directly

Calls 2

HeaderMethod · 0.95
NewReaderFunction · 0.85

Tested by

no test coverage detected