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

Function TestEdge_FrontmatterNoBody

apps/cli/internal/cli/edge_cases_test.go:95–119  ·  view source on GitHub ↗

--- File with frontmatter but no body ---

(t *testing.T)

Source from the content-addressed store, hash-verified

93// --- File with frontmatter but no body ---
94
95func TestEdge_FrontmatterNoBody(t *testing.T) {
96 tmpDir := t.TempDir()
97 content := `---
98id: "001"
99title: "No body task"
100status: pending
101priority: high
102effort: small
103dependencies: []
104tags: []
105created: 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

Callers

nothing calls this directly

Calls 3

writeTestFileFunction · 0.85
resetListFlagsFunction · 0.85
captureListOutputFunction · 0.85

Tested by

no test coverage detected