TODO: mock fs
(t *testing.T)
| 453 | |
| 454 | // TODO: mock fs |
| 455 | func TestSpecialVars(t *testing.T) { |
| 456 | t.Parallel() |
| 457 | |
| 458 | const dir = "testdata/special_vars" |
| 459 | const subdir = "testdata/special_vars/subdir" |
| 460 | |
| 461 | tests := []string{ |
| 462 | // Root |
| 463 | "print-task", |
| 464 | "print-root-dir", |
| 465 | "print-root-taskfile", |
| 466 | "print-taskfile", |
| 467 | "print-taskfile-dir", |
| 468 | "print-task-dir", |
| 469 | // Included |
| 470 | "included:print-task", |
| 471 | "included:print-root-dir", |
| 472 | "included:print-taskfile", |
| 473 | "included:print-taskfile-dir", |
| 474 | } |
| 475 | |
| 476 | for _, dir := range []string{dir, subdir} { |
| 477 | for _, test := range tests { |
| 478 | NewExecutorTest(t, |
| 479 | WithName(fmt.Sprintf("%s-%s", dir, test)), |
| 480 | WithExecutorOptions( |
| 481 | task.WithDir(dir), |
| 482 | task.WithSilent(true), |
| 483 | task.WithVersionCheck(true), |
| 484 | ), |
| 485 | WithTask(test), |
| 486 | WithFixtureTemplating(), |
| 487 | ) |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | func TestConcurrency(t *testing.T) { |
| 493 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…