MCPcopy Index your code
hub / github.com/coder/coder / TestSearchSnapshot_FuzzyFallback

Function TestSearchSnapshot_FuzzyFallback

agent/filefinder/query_test.go:129–137  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

127}
128
129func TestSearchSnapshot_FuzzyFallback(t *testing.T) {
130 t.Parallel()
131 snap := filefinder.MakeTestSnapshot([]string{"src/handler.go", "src/router.go", "lib/utils.go"})
132 cands := filefinder.SearchSnapshotForTest(filefinder.NewQueryPlanForTest("hndlr"), snap, 100)
133 if len(cands) == 0 {
134 t.Fatal("expected fuzzy fallback to find 'handler.go' for query 'hndlr'")
135 }
136 requireCandHasPath(t, cands, "src/handler.go")
137}
138
139func TestSearchSnapshot_FuzzyFallbackNoFirstCharMatch(t *testing.T) {
140 t.Parallel()

Callers

nothing calls this directly

Calls 3

MakeTestSnapshotFunction · 0.92
requireCandHasPathFunction · 0.85
FatalMethod · 0.80

Tested by

no test coverage detected