| 1415 | } |
| 1416 | |
| 1417 | func TestIncludesOptionalImplicitFalse(t *testing.T) { |
| 1418 | t.Parallel() |
| 1419 | |
| 1420 | const dir = "testdata/includes_optional_implicit_false" |
| 1421 | wd, _ := os.Getwd() |
| 1422 | |
| 1423 | message := "task: No Taskfile found at \"%s/%s/TaskfileOptional.yml\"" |
| 1424 | expected := fmt.Sprintf(message, filepath.ToSlash(wd), dir) |
| 1425 | |
| 1426 | e := task.NewExecutor( |
| 1427 | task.WithDir(dir), |
| 1428 | task.WithStdout(io.Discard), |
| 1429 | task.WithStderr(io.Discard), |
| 1430 | ) |
| 1431 | |
| 1432 | err := e.Setup() |
| 1433 | require.Error(t, err) |
| 1434 | assert.Equal(t, expected, err.Error()) |
| 1435 | } |
| 1436 | |
| 1437 | func TestIncludesOptionalExplicitFalse(t *testing.T) { |
| 1438 | t.Parallel() |