MCPcopy Create free account
hub / github.com/go-task/task / TestOutputGroupErrorOnlySwallowsOutputOnSuccess

Function TestOutputGroupErrorOnlySwallowsOutputOnSuccess

task_test.go:2373–2388  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2371}
2372
2373func 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
2390func TestOutputGroupErrorOnlyShowsOutputOnFailure(t *testing.T) {
2391 t.Parallel()

Callers

nothing calls this directly

Calls 3

SetupMethod · 0.95
RunMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…