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

Function TestPartialInputReader_MultipleStringFields

llm/partial_input_test.go:54–61  ·  view source on GitHub ↗

TestPartialInputReader_MultipleStringFields covers the common shape produced by @coder exec: cmd + cwd in one envelope.

(t *testing.T)

Source from the content-addressed store, hash-verified

52// TestPartialInputReader_MultipleStringFields covers the common shape
53// produced by @coder exec: cmd + cwd in one envelope.
54func TestPartialInputReader_MultipleStringFields(t *testing.T) {
55 r := NewPartialInputReader()
56 var names []string
57 r.OnField = func(f PartialInputField) { names = append(names, f.Name) }
58
59 r.Feed(`{"cmd":"ls","cwd":"/tmp"}`)
60 assert.ElementsMatch(t, []string{"cmd", "cwd"}, names)
61}
62
63// TestPartialInputReader_IgnoresNonStringFields documents that numbers,
64// booleans, arrays, and nested objects are skipped — they don't fit

Callers

nothing calls this directly

Calls 2

FeedMethod · 0.95
NewPartialInputReaderFunction · 0.85

Tested by

no test coverage detected