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

Function TestParseTaskContent_MinimalTask

sdk/go/parser/markdown_test.go:149–174  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

147}
148
149func TestParseTaskContent_MinimalTask(t *testing.T) {
150 content := []byte(`---
151id: "002"
152title: "Minimal Task"
153---
154
155Body content here.
156`)
157
158 task, err := ParseTaskContent("minimal.md", content)
159 if err != nil {
160 t.Fatalf("expected no error, got: %v", err)
161 }
162
163 if task.ID != "002" {
164 t.Errorf("expected ID '002', got '%s'", task.ID)
165 }
166
167 if task.Title != "Minimal Task" {
168 t.Errorf("expected title 'Minimal Task', got '%s'", task.Title)
169 }
170
171 if task.Body != "Body content here." {
172 t.Errorf("expected body 'Body content here.', got '%s'", task.Body)
173 }
174}
175
176func TestParseTaskContent_EmptyFile(t *testing.T) {
177 content := []byte("")

Callers

nothing calls this directly

Calls 1

ParseTaskContentFunction · 0.85

Tested by

no test coverage detected