(t *testing.T)
| 1804 | } |
| 1805 | |
| 1806 | func 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 | |
| 1815 | func TestWithStdout_SetsSpecifiedWriterAsStdout(t *testing.T) { |
| 1816 | t.Parallel() |