MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestPrintHelpListsAllCommands

Function TestPrintHelpListsAllCommands

internal/tui/tui_test.go:581–589  ·  view source on GitHub ↗

TestPrintHelpListsAllCommands: tui.PrintHelp formats every command in the central slice. Guards against a command being added to runSlash dispatch but forgotten in --help.

(t *testing.T)

Source from the content-addressed store, hash-verified

579func TestPrintHelpListsAllCommands(t *testing.T) {
580 var buf bytes.Buffer
581 PrintHelp(&buf)
582 for _, want := range []string{"/clear", "/models"} {
583 if !strings.Contains(buf.String(), want) {
584 t.Fatalf("PrintHelp missing %q:\n%s", want, buf.String())
585 }
586 }
587}
588
589// TestSlashModelSwitchesActive: /models <name> sets Active and rebuilds the
590// llm client's base URL / token / model to the new profile's values.
591func TestSlashModelSwitchesActive(t *testing.T) {
592 m := newTestModel(t, func(http.ResponseWriter, *http.Request) {})

Callers

nothing calls this directly

Calls 2

PrintHelpFunction · 0.85
StringMethod · 0.80

Tested by

no test coverage detected