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

Function TestContextArgvForm

cli/plugins/builtin_context_test.go:282–296  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

280}
281
282func TestContextArgvForm(t *testing.T) {
283 cmd, raw, err := parseContextInvocation([]string{"attach", "react-docs", "--rag", "8"})
284 if err != nil {
285 t.Fatal(err)
286 }
287 if cmd != "attach" {
288 t.Fatalf("cmd = %q", cmd)
289 }
290 if jsonString(raw, "name") != "react-docs" {
291 t.Fatalf("name = %q", jsonString(raw, "name"))
292 }
293 if jsonInt(raw, "rag") != 8 {
294 t.Fatalf("rag = %d", jsonInt(raw, "rag"))
295 }
296}

Callers

nothing calls this directly

Calls 3

parseContextInvocationFunction · 0.85
jsonStringFunction · 0.85
jsonIntFunction · 0.85

Tested by

no test coverage detected