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

Function TestChunkSourceAndJSONLPath

cli/ctxmgr/knowledge_test.go:70–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestChunkSourceAndJSONLPath(t *testing.T) {
71 if got := chunkSource("docs/intro.md#0007"); got != "docs/intro.md" {
72 t.Errorf("chunkSource = %q", got)
73 }
74 if got := chunkSource("plain/path.md"); got != "plain/path.md" {
75 t.Errorf("chunkSource passthrough = %q", got)
76 }
77 if !isJSONLPath("/tmp/x.JSONL") || isJSONLPath("/tmp/x.json") {
78 t.Error("isJSONLPath extension matching wrong")
79 }
80}
81
82func TestLexicalIndex_BM25RanksExactTerms(t *testing.T) {
83 fc := authDBCacheContext()

Callers

nothing calls this directly

Calls 4

chunkSourceFunction · 0.85
isJSONLPathFunction · 0.85
ErrorfMethod · 0.80
ErrorMethod · 0.65

Tested by

no test coverage detected