MCPcopy Create free account
hub / github.com/diillson/chatcli / TestSnippetAroundHelper

Function TestSnippetAroundHelper

cli/memory_extras_test.go:109–116  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

107}
108
109func TestSnippetAroundHelper(t *testing.T) {
110 // Reuse the session snippet helper to ensure it stays covered/working.
111 long := "alpha " + strings.Repeat("z", 300) + " needle " + strings.Repeat("y", 300)
112 s := snippetAround(long, strings.ToLower(long), "needle")
113 if !strings.Contains(s, "needle") {
114 t.Errorf("snippet should contain the term: %q", s)
115 }
116}

Callers

nothing calls this directly

Calls 2

snippetAroundFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected