MCPcopy
hub / github.com/bitfield/script / TestBytesReturnsErrorGivenReadErrorOnPipe

Function TestBytesReturnsErrorGivenReadErrorOnPipe

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

Source from the content-addressed store, hash-verified

1526}
1527
1528func TestBytesReturnsErrorGivenReadErrorOnPipe(t *testing.T) {
1529 t.Parallel()
1530 brokenReader := iotest.ErrReader(errors.New("oh no"))
1531 _, err := script.NewPipe().WithReader(brokenReader).Bytes()
1532 if err == nil {
1533 t.Fatal(nil)
1534 }
1535}
1536
1537func TestCountLines_CountsCorrectNumberOfLinesInInput(t *testing.T) {
1538 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewPipeFunction · 0.92
BytesMethod · 0.80
WithReaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…