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

Function TestLoadMemoryMode

cli/memory_mode_test.go:10–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8import "testing"
9
10func TestLoadMemoryMode(t *testing.T) {
11 cases := map[string]string{
12 "": memModeIndex, // default is pull-first
13 "index": memModeIndex,
14 "full": memModeFull,
15 "off": memModeOff,
16 " FULL ": memModeFull, // trimmed + case-insensitive
17 "Index": memModeIndex,
18 "bogus": memModeIndex, // unknown falls back to default
19 }
20 for in, want := range cases {
21 t.Setenv("CHATCLI_MEMORY_MODE", in)
22 if got := loadMemoryMode(); got != want {
23 t.Errorf("loadMemoryMode(%q) = %q, want %q", in, got, want)
24 }
25 }
26}

Callers

nothing calls this directly

Calls 2

loadMemoryModeFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected