| 2371 | } |
| 2372 | |
| 2373 | func TestOutputGroupErrorOnlySwallowsOutputOnSuccess(t *testing.T) { |
| 2374 | t.Parallel() |
| 2375 | |
| 2376 | const dir = "testdata/output_group_error_only" |
| 2377 | var buff bytes.Buffer |
| 2378 | e := task.NewExecutor( |
| 2379 | task.WithDir(dir), |
| 2380 | task.WithStdout(&buff), |
| 2381 | task.WithStderr(&buff), |
| 2382 | ) |
| 2383 | require.NoError(t, e.Setup()) |
| 2384 | |
| 2385 | require.NoError(t, e.Run(t.Context(), &task.Call{Task: "passing"})) |
| 2386 | t.Log(buff.String()) |
| 2387 | assert.Empty(t, buff.String()) |
| 2388 | } |
| 2389 | |
| 2390 | func TestOutputGroupErrorOnlyShowsOutputOnFailure(t *testing.T) { |
| 2391 | t.Parallel() |