MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestCmdShowTaskNoSubstringMatch

Function TestCmdShowTaskNoSubstringMatch

internal/app/show_test.go:214–227  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

212}
213
214func 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
229func TestCmdShowTaskStaleMarker(t *testing.T) {
230 root, db := showListEditDB(t)

Callers

nothing calls this directly

Calls 4

showListEditDBFunction · 0.85
captureStdoutFunction · 0.85
cmdShowFunction · 0.85
insertTaskFunction · 0.70

Tested by

no test coverage detected