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

Function TestForCmds

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

Source from the content-addressed store, hash-verified

914}
915
916func TestForCmds(t *testing.T) {
917 t.Parallel()
918
919 tests := []struct {
920 name string
921 wantErr bool
922 }{
923 {name: "loop-explicit"},
924 {name: "loop-matrix"},
925 {name: "loop-matrix-ref"},
926 {
927 name: "loop-matrix-ref-error",
928 wantErr: true,
929 },
930 {name: "loop-sources"},
931 {name: "loop-sources-glob"},
932 {name: "loop-generates"},
933 {name: "loop-generates-glob"},
934 {name: "loop-vars"},
935 {name: "loop-vars-sh"},
936 {name: "loop-task"},
937 {name: "loop-task-as"},
938 {name: "loop-different-tasks"},
939 }
940
941 for _, test := range tests {
942 opts := []ExecutorTestOption{
943 WithName(test.name),
944 WithExecutorOptions(
945 task.WithDir("testdata/for/cmds"),
946 task.WithSilent(true),
947 task.WithForce(true),
948 ),
949 WithTask(test.name),
950 WithFixtureTemplating(),
951 }
952 if test.wantErr {
953 opts = append(opts, WithRunError())
954 }
955 NewExecutorTest(t, opts...)
956 }
957}
958
959func TestForDeps(t *testing.T) {
960 t.Parallel()

Callers

nothing calls this directly

Calls 6

WithNameFunction · 0.85
WithExecutorOptionsFunction · 0.85
WithTaskFunction · 0.85
WithFixtureTemplatingFunction · 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…