(t *testing.T)
| 109 | } |
| 110 | |
| 111 | func 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 | |
| 124 | func TestParseMemoryInvocation_Aliases(t *testing.T) { |
| 125 | for _, alias := range []string{"add", "store", "note"} { |
nothing calls this directly
no test coverage detected