(t *testing.T)
| 925 | } |
| 926 | |
| 927 | func TestCmdListTasksEmptyJSON(t *testing.T) { |
| 928 | _, _ = showListEditDB(t) |
| 929 | out := captureStdout(t, func() { |
| 930 | if rc := cmdList([]string{"tasks", "--format", "json"}); rc != 0 { |
| 931 | t.Fatalf("rc=%d", rc) |
| 932 | } |
| 933 | }) |
| 934 | var rows []taskListRow |
| 935 | if err := json.Unmarshal([]byte(out), &rows); err != nil { |
| 936 | t.Fatalf("empty-result JSON should parse, got %v\nout=%q", err, out) |
| 937 | } |
| 938 | if len(rows) != 0 { |
| 939 | t.Errorf("expected empty array, got %d rows", len(rows)) |
| 940 | } |
| 941 | } |
| 942 | |
| 943 | func TestCmdListTasksSlugAlwaysFull(t *testing.T) { |
| 944 | // Slugs are emitted in full by default — there's no length cap. The |
nothing calls this directly
no test coverage detected