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

Function TestStringReturnsErrorGivenReadErrorOnPipe

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

Source from the content-addressed store, hash-verified

1683}
1684
1685func TestStringReturnsErrorGivenReadErrorOnPipe(t *testing.T) {
1686 t.Parallel()
1687 brokenReader := iotest.ErrReader(errors.New("oh no"))
1688 _, err := script.NewPipe().WithReader(brokenReader).String()
1689 if err == nil {
1690 t.Fatal(nil)
1691 }
1692}
1693
1694func TestWaitReadsPipeSourceToCompletion(t *testing.T) {
1695 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewPipeFunction · 0.92
StringMethod · 0.80
WithReaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…