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)
| 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. |
| 582 | func 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 |