(t *testing.T)
| 576 | } |
| 577 | |
| 578 | func TestStatus_NoArgs_ZeroInProgress(t *testing.T) { |
| 579 | tmpDir := t.TempDir() |
| 580 | if err := os.WriteFile(filepath.Join(tmpDir, "001.md"), []byte(`--- |
| 581 | id: "001" |
| 582 | title: "Done task" |
| 583 | status: completed |
| 584 | tags: [] |
| 585 | dependencies: [] |
| 586 | --- |
| 587 | `), 0644); err != nil { |
| 588 | t.Fatal(err) |
| 589 | } |
| 590 | |
| 591 | resetStatusFlags() |
| 592 | taskDir = tmpDir |
| 593 | |
| 594 | stdout, stderr, err := captureStatusNoArgsOutputWithStderr(t) |
| 595 | if err != nil { |
| 596 | t.Fatalf("unexpected error: %v", err) |
| 597 | } |
| 598 | if stdout != "" { |
| 599 | t.Errorf("expected empty stdout, got: %q", stdout) |
| 600 | } |
| 601 | if !strings.Contains(stderr, "No tasks currently in progress") { |
| 602 | t.Errorf("expected informational message on stderr, got: %q", stderr) |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | func TestStatus_NoArgs_ZeroInProgress_JSON(t *testing.T) { |
| 607 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected