(t *testing.T)
| 345 | } |
| 346 | |
| 347 | func 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 | |
| 370 | func TestToASCII_WithFormatter(t *testing.T) { |
| 371 | tasks := []*model.Task{ |
nothing calls this directly
no test coverage detected