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

Function TestStdoutReturnsErrorGivenReadErrorOnPipe

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

Source from the content-addressed store, hash-verified

1443}
1444
1445func TestStdoutReturnsErrorGivenReadErrorOnPipe(t *testing.T) {
1446 t.Parallel()
1447 brokenReader := iotest.ErrReader(errors.New("oh no"))
1448 _, err := script.NewPipe().WithStdout(io.Discard).
1449 WithReader(brokenReader).Stdout()
1450 if err == nil {
1451 t.Fatal(nil)
1452 }
1453}
1454
1455func TestStdoutSendsPipeContentsToConfiguredStandardOutput(t *testing.T) {
1456 t.Parallel()

Callers

nothing calls this directly

Calls 4

NewPipeFunction · 0.92
StdoutMethod · 0.80
WithReaderMethod · 0.80
WithStdoutMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…