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

Function TestCountLines_ReturnsErrorGivenReadErrorOnPipe

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

Source from the content-addressed store, hash-verified

1559}
1560
1561func TestCountLines_ReturnsErrorGivenReadErrorOnPipe(t *testing.T) {
1562 t.Parallel()
1563 brokenReader := iotest.ErrReader(errors.New("oh no"))
1564 _, err := script.NewPipe().WithReader(brokenReader).CountLines()
1565 if err == nil {
1566 t.Fatal(nil)
1567 }
1568}
1569
1570func TestSHA256Sum_OutputsCorrectHash(t *testing.T) {
1571 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewPipeFunction · 0.92
CountLinesMethod · 0.80
WithReaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…