MCPcopy Create free account
hub / github.com/driangle/taskmd / createRmTestFiles

Function createRmTestFiles

apps/cli/internal/cli/rm_test.go:39–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37`
38
39func createRmTestFiles(t *testing.T) string {
40 t.Helper()
41 tmpDir := t.TempDir()
42
43 files := map[string]string{
44 "001-setup.md": rmTaskPending,
45 "002-old.md": rmTaskCompleted,
46 }
47
48 for name, content := range files {
49 if err := os.WriteFile(filepath.Join(tmpDir, name), []byte(content), 0644); err != nil {
50 t.Fatalf("failed to create %s: %v", name, err)
51 }
52 }
53
54 return tmpDir
55}
56
57func resetRmFlags() {
58 rmForce = false

Callers 7

TestRm_WithForceFunction · 0.85
TestRm_DryRunFunction · 0.85
TestRm_TaskNotFoundFunction · 0.85
TestRm_ShowsTaskDetailsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected