MCPcopy Create free account
hub / github.com/driangle/taskmd / TestStatus_FuzzyMatch

Function TestStatus_FuzzyMatch

apps/cli/internal/cli/status_test.go:270–284  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

268}
269
270func TestStatus_FuzzyMatch(t *testing.T) {
271 tmpDir := createStatusTestFiles(t)
272 resetStatusFlags()
273 taskDir = tmpDir
274
275 // "auth" is a substring of "Implement authentication"
276 statusStdinReader = strings.NewReader("1\n")
277 defer func() { statusStdinReader = os.Stdin }()
278
279 output := captureStatusOutput(t, "auth")
280
281 if !strings.Contains(output, "Task: 002") {
282 t.Error("Expected fuzzy match to find task 002")
283 }
284}
285
286func TestStatus_EmptyDirectory(t *testing.T) {
287 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 4

createStatusTestFilesFunction · 0.85
resetStatusFlagsFunction · 0.85
captureStatusOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected