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

Function TestGet_FuzzyMatch_Substring

apps/cli/internal/cli/get_test.go:308–323  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

306}
307
308func TestGet_FuzzyMatch_Substring(t *testing.T) {
309 tmpDir := createGetTestFiles(t)
310 resetGetFlags()
311 taskDir = tmpDir
312
313 // "auth" is a substring of "Implement authentication" — should fuzzy match
314 // Simulate selecting option 1
315 getStdinReader = strings.NewReader("1\n")
316 defer func() { getStdinReader = os.Stdin }()
317
318 output := captureGetOutput(t, "auth")
319
320 if !strings.Contains(output, "Task: 002") {
321 t.Error("Expected fuzzy substring match to find task 002")
322 }
323}
324
325func TestGet_FuzzyMatch_Selection(t *testing.T) {
326 tmpDir := createGetTestFiles(t)

Callers

nothing calls this directly

Calls 4

createGetTestFilesFunction · 0.85
resetGetFlagsFunction · 0.85
captureGetOutputFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected