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

Function TestForDeps

executor_test.go:959–1003  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

957}
958
959func TestForDeps(t *testing.T) {
960 t.Parallel()
961
962 tests := []struct {
963 name string
964 wantErr bool
965 }{
966 {name: "loop-explicit"},
967 {name: "loop-matrix"},
968 {name: "loop-matrix-ref"},
969 {
970 name: "loop-matrix-ref-error",
971 wantErr: true,
972 },
973 {name: "loop-sources"},
974 {name: "loop-sources-glob"},
975 {name: "loop-generates"},
976 {name: "loop-generates-glob"},
977 {name: "loop-vars"},
978 {name: "loop-vars-sh"},
979 {name: "loop-task"},
980 {name: "loop-task-as"},
981 {name: "loop-different-tasks"},
982 }
983
984 for _, test := range tests {
985 opts := []ExecutorTestOption{
986 WithName(test.name),
987 WithExecutorOptions(
988 task.WithDir("testdata/for/deps"),
989 task.WithSilent(true),
990 task.WithForce(true),
991 // Force output of each dep to be grouped together to prevent interleaving
992 task.WithOutputStyle(ast.Output{Name: "group"}),
993 ),
994 WithTask(test.name),
995 WithFixtureTemplating(),
996 WithPostProcessFn(PPSortedLines),
997 }
998 if test.wantErr {
999 opts = append(opts, WithRunError())
1000 }
1001 NewExecutorTest(t, opts...)
1002 }
1003}
1004
1005func TestReference(t *testing.T) {
1006 t.Parallel()

Callers

nothing calls this directly

Calls 7

WithNameFunction · 0.85
WithExecutorOptionsFunction · 0.85
WithTaskFunction · 0.85
WithFixtureTemplatingFunction · 0.85
WithPostProcessFnFunction · 0.85
WithRunErrorFunction · 0.85
NewExecutorTestFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…