MCPcopy
hub / github.com/go-task/task / TestTaskIgnoreErrors

Function TestTaskIgnoreErrors

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

Source from the content-addressed store, hash-verified

935}
936
937func TestTaskIgnoreErrors(t *testing.T) {
938 t.Parallel()
939
940 const dir = "testdata/ignore_errors"
941
942 e := task.NewExecutor(
943 task.WithDir(dir),
944 task.WithStdout(io.Discard),
945 task.WithStderr(io.Discard),
946 )
947 require.NoError(t, e.Setup())
948
949 require.NoError(t, e.Run(t.Context(), &task.Call{Task: "task-should-pass"}))
950 require.Error(t, e.Run(t.Context(), &task.Call{Task: "task-should-fail"}))
951 require.NoError(t, e.Run(t.Context(), &task.Call{Task: "cmd-should-pass"}))
952 require.Error(t, e.Run(t.Context(), &task.Call{Task: "cmd-should-fail"}))
953}
954
955func TestExpand(t *testing.T) {
956 t.Parallel()

Callers

nothing calls this directly

Calls 3

SetupMethod · 0.95
RunMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…