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

Function TestParseMemoryInvocation_Envelope

cli/plugins/builtin_memory_test.go:111–122  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

109}
110
111func TestParseMemoryInvocation_Envelope(t *testing.T) {
112 cmd, inner, err := parseMemoryInvocation([]string{`{"cmd":"remember","args":{"content":"x","category":"personal"}}`})
113 if err != nil {
114 t.Fatalf("unexpected error: %v", err)
115 }
116 if cmd != "remember" {
117 t.Errorf("cmd = %q, want remember", cmd)
118 }
119 if !strings.Contains(inner, `"content":"x"`) {
120 t.Errorf("inner missing content: %s", inner)
121 }
122}
123
124func TestParseMemoryInvocation_Aliases(t *testing.T) {
125 for _, alias := range []string{"add", "store", "note"} {

Callers

nothing calls this directly

Calls 2

parseMemoryInvocationFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected