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

Function TestReadWriteLongTerm

cli/workspace/memory_test.go:11–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestReadWriteLongTerm(t *testing.T) {
12 dir := t.TempDir()
13 ms := NewMemoryStore(dir, testLogger())
14
15 if err := ms.WriteLongTerm("# Key Facts\n- Go project"); err != nil {
16 t.Fatalf("write failed: %v", err)
17 }
18
19 content := ms.ReadLongTerm()
20 if !strings.Contains(content, "Go project") {
21 t.Errorf("expected 'Go project', got %q", content)
22 }
23}
24
25func TestAppendLongTerm(t *testing.T) {
26 dir := t.TempDir()

Callers

nothing calls this directly

Calls 5

WriteLongTermMethod · 0.95
ReadLongTermMethod · 0.95
ErrorfMethod · 0.80
NewMemoryStoreFunction · 0.70
testLoggerFunction · 0.70

Tested by

no test coverage detected