MCPcopy Index your code
hub / github.com/go-task/task / TestSpecialVars

Function TestSpecialVars

executor_test.go:455–490  ·  view source on GitHub ↗

TODO: mock fs

(t *testing.T)

Source from the content-addressed store, hash-verified

453
454// TODO: mock fs
455func 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
492func TestConcurrency(t *testing.T) {
493 t.Parallel()

Callers

nothing calls this directly

Calls 5

NewExecutorTestFunction · 0.85
WithNameFunction · 0.85
WithExecutorOptionsFunction · 0.85
WithTaskFunction · 0.85
WithFixtureTemplatingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…