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

Function TestWithError_SetsSpecifiedErrorOnPipe

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

Source from the content-addressed store, hash-verified

1804}
1805
1806func TestWithError_SetsSpecifiedErrorOnPipe(t *testing.T) {
1807 t.Parallel()
1808 fakeErr := errors.New("oh no")
1809 p := script.NewPipe().WithError(fakeErr)
1810 if p.Error() != fakeErr {
1811 t.Errorf("want %q, got %q", fakeErr, p.Error())
1812 }
1813}
1814
1815func TestWithStdout_SetsSpecifiedWriterAsStdout(t *testing.T) {
1816 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewPipeFunction · 0.92
WithErrorMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…