(t *testing.T)
| 212 | } |
| 213 | |
| 214 | func TestCmdShowTaskNoSubstringMatch(t *testing.T) { |
| 215 | root, db := showListEditDB(t) |
| 216 | insertTask(t, db, "auth-one", "A1", "backlog", "medium", filepath.Join(root, "x"), nil) |
| 217 | insertTask(t, db, "auth-two", "A2", "backlog", "medium", filepath.Join(root, "y"), nil) |
| 218 | // Substring "auth" should NOT match — exact only. |
| 219 | out := captureStdout(t, func() { |
| 220 | if rc := cmdShow([]string{"task", "auth"}); rc != 1 { |
| 221 | t.Errorf("rc=%d, want 1", rc) |
| 222 | } |
| 223 | }) |
| 224 | if !strings.Contains(out, "no task matching") { |
| 225 | t.Errorf("expected no match error; out=%q", out) |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | func TestCmdShowTaskStaleMarker(t *testing.T) { |
| 230 | root, db := showListEditDB(t) |
nothing calls this directly
no test coverage detected