(t *testing.T)
| 1920 | } |
| 1921 | |
| 1922 | func 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 | |
| 1935 | func TestReadReturnsErrorGivenReadErrorOnPipe(t *testing.T) { |
| 1936 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…