(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func createValidateTestFiles(t *testing.T) string { |
| 67 | t.Helper() |
| 68 | tmpDir := t.TempDir() |
| 69 | |
| 70 | tasks := map[string]string{ |
| 71 | "001-valid.md": `--- |
| 72 | id: "001" |
| 73 | title: "Valid Task" |
| 74 | status: pending |
| 75 | priority: high |
| 76 | effort: small |
| 77 | dependencies: [] |
| 78 | tags: ["test"] |
| 79 | created: 2026-02-08 |
| 80 | --- |
| 81 | |
| 82 | A valid task. |
| 83 | `, |
| 84 | "002-valid.md": `--- |
| 85 | id: "002" |
| 86 | title: "Another Valid Task" |
| 87 | status: completed |
| 88 | priority: medium |
| 89 | effort: medium |
| 90 | dependencies: ["001"] |
| 91 | tags: ["test"] |
| 92 | created: 2026-02-08 |
| 93 | --- |
| 94 | |
| 95 | Another valid task. |
| 96 | `, |
| 97 | } |
| 98 | |
| 99 | for filename, content := range tasks { |
| 100 | if err := os.WriteFile(filepath.Join(tmpDir, filename), []byte(content), 0644); err != nil { |
| 101 | t.Fatalf("failed to create test file %s: %v", filename, err) |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | return tmpDir |
| 106 | } |
| 107 | |
| 108 | func captureValidateOutput(t *testing.T, args []string) (string, error) { |
| 109 | t.Helper() |
no outgoing calls
no test coverage detected