TestBackendLabelShowsActiveProfile: the label echoes the currently-active profile name. Default Bootstrap ships one profile called "local". No brackets: the label is just the name (bold).
(t *testing.T)
| 559 | // profile name. Default Bootstrap ships one profile called "local". No |
| 560 | // brackets: the label is just the name (bold). |
| 561 | func TestBackendLabelShowsActiveProfile(t *testing.T) { |
| 562 | cfg, _, _ := config.Bootstrap(t.TempDir()) |
| 563 | if cfg.Active != "local" { |
| 564 | t.Fatalf("default Active expected local, got %q", cfg.Active) |
| 565 | } |
| 566 | label := stripANSI(backendLabel(cfg, true)) |
| 567 | if label != "local" { |
| 568 | t.Fatalf("expected plain 'local' label, got %q", label) |
| 569 | } |
| 570 | // second profile → label follows Active when switched |
| 571 | cfg.Models["remote"] = &config.Profile{LLM: "m", URL: "http://r"} |
| 572 | cfg.Active = "remote" |
| 573 | if got := stripANSI(backendLabel(cfg, true)); got != "remote" { |
| 574 | t.Fatalf("expected 'remote' after switch, got %q", got) |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | // TestPrintHelpListsAllCommands: tui.PrintHelp formats every command in the |
| 579 | // central slice. Guards against a command being added to runSlash dispatch |
nothing calls this directly
no test coverage detected