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

Method TestReadUntil

utils/binary/read_test.go:35–42  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

33}
34
35func (s *BinarySuite) TestReadUntil(c *C) {
36 buf := bytes.NewBuffer([]byte("foo bar"))
37
38 b, err := ReadUntil(buf, ' ')
39 c.Assert(err, IsNil)
40 c.Assert(b, HasLen, 3)
41 c.Assert(string(b), Equals, "foo")
42}
43
44func (s *BinarySuite) TestReadUntilFromBufioReader(c *C) {
45 buf := bufio.NewReader(bytes.NewBuffer([]byte("foo bar")))

Callers

nothing calls this directly

Calls 1

ReadUntilFunction · 0.85

Tested by

no test coverage detected