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

Function TestParseTaskContent_EmptyFile

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

Source from the content-addressed store, hash-verified

174}
175
176func TestParseTaskContent_EmptyFile(t *testing.T) {
177 content := []byte("")
178
179 _, err := ParseTaskContent("empty.md", content)
180 if err == nil {
181 t.Error("expected error for empty file")
182 }
183
184 parseErr, ok := err.(*ParseError)
185 if !ok {
186 t.Errorf("expected ParseError, got %T", err)
187 } else if parseErr.FilePath != "empty.md" {
188 t.Errorf("expected FilePath 'empty.md', got '%s'", parseErr.FilePath)
189 }
190}
191
192func TestParseTaskContent_MissingFrontmatter(t *testing.T) {
193 content := []byte(`# No Frontmatter

Callers

nothing calls this directly

Calls 2

ParseTaskContentFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected