MCPcopy Create free account
hub / github.com/go-task/task / run

Method run

task_test.go:681–710  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

679}
680
681func (s gitignoreSeq) run(t *testing.T) {
682 t.Helper()
683 cleanup := func() {
684 _ = os.RemoveAll(filepathext.SmartJoin(s.dir, ".task"))
685 for name := range s.create {
686 _ = os.Remove(filepathext.SmartJoin(s.dir, name))
687 }
688 for _, name := range s.artifacts {
689 _ = os.Remove(filepathext.SmartJoin(s.dir, name))
690 }
691 for name, content := range s.restore {
692 writeFile(t, s.dir, name, content)
693 }
694 }
695 cleanup()
696 t.Cleanup(cleanup)
697 for name, content := range s.create {
698 writeFile(t, s.dir, name, content)
699 }
700 for _, step := range s.steps {
701 for name, content := range step.write {
702 writeFile(t, s.dir, name, content)
703 }
704 NewExecutorTest(t,
705 WithName(step.run),
706 WithExecutorOptions(task.WithDir(s.dir)),
707 WithTask(s.task),
708 )
709 }
710}
711
712func TestGitignoreChecksum(t *testing.T) { //nolint:paralleltest // shares testdata/gitignore and mutates fixture files
713 gitignoreSeq{

Callers 5

TestGitignoreChecksumFunction · 0.45
TestGitignoreNegationFunction · 0.45
TestGitignoreNestedFunction · 0.45
TestGitignoreIncludedFunction · 0.45

Calls 6

SmartJoinFunction · 0.92
NewExecutorTestFunction · 0.85
WithNameFunction · 0.85
WithExecutorOptionsFunction · 0.85
WithTaskFunction · 0.85
writeFileFunction · 0.70

Tested by

no test coverage detected