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

Function TestLevenshtein

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

Source from the content-addressed store, hash-verified

451}
452
453func TestLevenshtein(t *testing.T) {
454 tests := []struct {
455 a, b string
456 expected int
457 }{
458 {"", "", 0},
459 {"abc", "", 3},
460 {"", "abc", 3},
461 {"abc", "abc", 0},
462 {"abc", "abd", 1},
463 {"kitten", "sitting", 3},
464 }
465
466 for _, tt := range tests {
467 result := levenshtein(tt.a, tt.b)
468 if result != tt.expected {
469 t.Errorf("levenshtein(%q, %q) = %d, expected %d", tt.a, tt.b, result, tt.expected)
470 }
471 }
472}
473
474// --- File path matching tests ---
475

Callers

nothing calls this directly

Calls 1

levenshteinFunction · 0.85

Tested by

no test coverage detected