(t *testing.T)
| 337 | } |
| 338 | |
| 339 | func TestExecForEach_SendsStderrOutputToPipeStderr(t *testing.T) { |
| 340 | t.Parallel() |
| 341 | buf := new(bytes.Buffer) |
| 342 | out, err := script.Echo("go").WithStderr(buf).ExecForEach("{{.}}").String() |
| 343 | if err != nil { |
| 344 | t.Fatal(err) |
| 345 | } |
| 346 | if out != "" { |
| 347 | t.Fatalf("unexpected output: %q", out) |
| 348 | } |
| 349 | if !strings.Contains(buf.String(), "Usage") { |
| 350 | t.Errorf("want stderr output containing the word 'Usage', got %q", buf.String()) |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | func TestExecSendsStderrOutputToPipeStderr(t *testing.T) { |
| 355 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…