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

Function TestEncodeErrorLine

plumbing/format/pktline/error_test.go:18–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16}
17
18func TestEncodeErrorLine(t *testing.T) {
19 e := &ErrorLine{
20 Text: "something",
21 }
22 var buf bytes.Buffer
23 err := e.Encode(&buf)
24 if err != nil {
25 t.Fatal(err)
26 }
27 if buf.String() != "0012ERR something\n" {
28 t.Fatalf("unexpected encoded error line: %q", buf.String())
29 }
30}
31
32func TestDecodeEmptyErrorLine(t *testing.T) {
33 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 2

EncodeMethod · 0.95
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…