MCPcopy Index your code
hub / github.com/bitfield/script / TestReadReturnsEOFOnUninitialisedPipe

Function TestReadReturnsEOFOnUninitialisedPipe

script_test.go:1922–1933  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1920}
1921
1922func TestReadReturnsEOFOnUninitialisedPipe(t *testing.T) {
1923 t.Parallel()
1924 p := &script.Pipe{}
1925 buf := []byte{0} // try to read at least 1 byte
1926 n, err := p.Read(buf)
1927 if !errors.Is(err, io.EOF) {
1928 t.Fatalf("want io.EOF, got %v", err)
1929 }
1930 if n > 0 {
1931 t.Errorf("unexpectedly read %d bytes", n)
1932 }
1933}
1934
1935func TestReadReturnsErrorGivenReadErrorOnPipe(t *testing.T) {
1936 t.Parallel()

Callers

nothing calls this directly

Calls 1

ReadMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…