| 1241 | } |
| 1242 | |
| 1243 | func TestIncludesMissingTaskfile(t *testing.T) { |
| 1244 | t.Parallel() |
| 1245 | |
| 1246 | const dir = "testdata/includes_missing_taskfile" |
| 1247 | |
| 1248 | var buff bytes.Buffer |
| 1249 | e := task.NewExecutor( |
| 1250 | task.WithDir(dir), |
| 1251 | task.WithStdout(&buff), |
| 1252 | task.WithStderr(&buff), |
| 1253 | task.WithSilent(true), |
| 1254 | ) |
| 1255 | |
| 1256 | err := e.Setup() |
| 1257 | require.Error(t, err) |
| 1258 | assert.Contains(t, err.Error(), "include must specify taskfile or dir") |
| 1259 | assert.NotContains(t, err.Error(), "include cycle detected") |
| 1260 | } |
| 1261 | |
| 1262 | func TestIncludesEmptyMain(t *testing.T) { |
| 1263 | t.Parallel() |