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

Function TestToASCII_NilFormatter_PlainText

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

Source from the content-addressed store, hash-verified

345}
346
347func TestToASCII_NilFormatter_PlainText(t *testing.T) {
348 tasks := createTestTasks()
349 g := NewGraph(tasks)
350
351 output := g.ToASCII("T1", true, nil)
352
353 // Verify plain text output (no ANSI codes)
354 if strings.Contains(output, "\033[") {
355 t.Error("Expected plain text output with nil formatter, but found ANSI escape codes")
356 }
357
358 // Verify content is present
359 if !strings.Contains(output, "[T1]") {
360 t.Error("Expected output to contain [T1]")
361 }
362 if !strings.Contains(output, "Task 1") {
363 t.Error("Expected output to contain 'Task 1'")
364 }
365 if !strings.Contains(output, "✓") {
366 t.Error("Expected output to contain completed checkmark")
367 }
368}
369
370func TestToASCII_WithFormatter(t *testing.T) {
371 tasks := []*model.Task{

Callers

nothing calls this directly

Calls 4

ToASCIIMethod · 0.95
createTestTasksFunction · 0.85
NewGraphFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected