(t *testing.T)
| 957 | } |
| 958 | |
| 959 | func 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 | |
| 1005 | func TestReference(t *testing.T) { |
| 1006 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…