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

Function TestToASCII

sdk/go/graph/graph_test.go:265–299  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

263}
264
265func TestToASCII(t *testing.T) {
266 tasks := []*model.Task{
267 {
268 ID: "T1",
269 Title: "Task 1",
270 Status: model.StatusCompleted,
271 Dependencies: []string{},
272 },
273 {
274 ID: "T2",
275 Title: "Task 2",
276 Status: model.StatusInProgress,
277 Dependencies: []string{"T1"},
278 },
279 }
280
281 g := NewGraph(tasks)
282 output := g.ToASCII("T1", true, nil)
283
284 if !strings.Contains(output, "T1") {
285 t.Error("Expected ASCII output to contain T1")
286 }
287
288 if !strings.Contains(output, "T2") {
289 t.Error("Expected ASCII output to contain T2")
290 }
291
292 if !strings.Contains(output, "✓") {
293 t.Error("Expected ASCII output to contain completed checkmark")
294 }
295
296 if !strings.Contains(output, "⋯") {
297 t.Error("Expected ASCII output to contain in-progress indicator")
298 }
299}
300
301func TestToJSON(t *testing.T) {
302 tasks := []*model.Task{

Callers

nothing calls this directly

Calls 3

ToASCIIMethod · 0.95
NewGraphFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected