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

579// TestPrintHelpListsAllCommands: tui.PrintHelp formats every command in the
580// central slice. Guards against a command being added to runSlash dispatch
581// but forgotten in --help.
582func TestPrintHelpListsAllCommands(t *testing.T) {
583 var buf bytes.Buffer
584 PrintHelp(&buf)
585 for _, want := range []string{"/clear", "/models", "/hamrpass"} {
586 if !strings.Contains(buf.String(), want) {
587 t.Fatalf("PrintHelp missing %q:\n%s", want, buf.String())
588 }
589 }
590}
591
592// TestSlashModelSwitchesActive: /models <name> sets Active and rebuilds the

Callers

nothing calls this directly

Calls 2

PrintHelpFunction · 0.85
StringMethod · 0.80

Tested by

no test coverage detected