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

Function TestRunCoderOnce_InvalidInput

cli/gateway_command_test.go:79–86  ·  view source on GitHub ↗

TestRunCoderOnce_InvalidInput pins the CutPrefix refactor: only "/coder " is a valid one-shot invocation; bare "/coder" or anything without the prefix must error before touching the (nil) LLM client.

(t *testing.T)

Source from the content-addressed store, hash-verified

77// is a valid one-shot invocation; bare "/coder" or anything without the prefix
78// must error before touching the (nil) LLM client.
79func TestRunCoderOnce_InvalidInput(t *testing.T) {
80 c := &ChatCLI{}
81 for _, in := range []string{"/coder", "no prefix", "/coderx hi", ""} {
82 if err := c.RunCoderOnce(context.Background(), in); err == nil {
83 t.Errorf("RunCoderOnce(%q) should error on invalid input", in)
84 }
85 }
86}
87
88func TestSetUnattended(t *testing.T) {
89 c := &ChatCLI{}

Callers

nothing calls this directly

Calls 2

RunCoderOnceMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected