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)
| 77 | // is a valid one-shot invocation; bare "/coder" or anything without the prefix |
| 78 | // must error before touching the (nil) LLM client. |
| 79 | func 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 | |
| 88 | func TestSetUnattended(t *testing.T) { |
| 89 | c := &ChatCLI{} |
nothing calls this directly
no test coverage detected