(t *testing.T)
| 795 | } |
| 796 | |
| 797 | func TestStatus_Statusline_LongTitle(t *testing.T) { |
| 798 | tmpDir := t.TempDir() |
| 799 | longTitle := "This is a very long task title that exceeds thirty characters" |
| 800 | if err := os.WriteFile(filepath.Join(tmpDir, "001.md"), []byte(`--- |
| 801 | id: "001" |
| 802 | title: "`+longTitle+`" |
| 803 | status: in-progress |
| 804 | tags: [] |
| 805 | dependencies: [] |
| 806 | --- |
| 807 | `), 0644); err != nil { |
| 808 | t.Fatal(err) |
| 809 | } |
| 810 | |
| 811 | resetStatusFlags() |
| 812 | taskDir = tmpDir |
| 813 | statusStatusline = true |
| 814 | |
| 815 | output, err := captureStatusNoArgsOutput(t) |
| 816 | if err != nil { |
| 817 | t.Fatalf("unexpected error: %v", err) |
| 818 | } |
| 819 | |
| 820 | expected := "#001 " + longTitle + "\n" |
| 821 | if output != expected { |
| 822 | t.Errorf("expected %q, got: %q", expected, output) |
| 823 | } |
| 824 | } |
| 825 | |
| 826 | func TestStatus_NoArgs_Scope(t *testing.T) { |
| 827 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected