--- File with frontmatter but no body ---
(t *testing.T)
| 93 | // --- File with frontmatter but no body --- |
| 94 | |
| 95 | func TestEdge_FrontmatterNoBody(t *testing.T) { |
| 96 | tmpDir := t.TempDir() |
| 97 | content := `--- |
| 98 | id: "001" |
| 99 | title: "No body task" |
| 100 | status: pending |
| 101 | priority: high |
| 102 | effort: small |
| 103 | dependencies: [] |
| 104 | tags: [] |
| 105 | created: 2026-02-08 |
| 106 | --- |
| 107 | ` |
| 108 | writeTestFile(t, tmpDir, "001-nobody.md", content) |
| 109 | |
| 110 | resetListFlags() |
| 111 | noColor = true |
| 112 | output, err := captureListOutput(t, tmpDir) |
| 113 | if err != nil { |
| 114 | t.Fatalf("unexpected error: %v", err) |
| 115 | } |
| 116 | if !strings.Contains(output, "001") { |
| 117 | t.Errorf("expected task 001 in output, got: %q", output) |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | // --- Non-existent directory --- |
| 122 |
nothing calls this directly
no test coverage detected