TestPopoverTabOnClearCommandHasNoArgSpace: /clear takes no args, so Tab completes to "/clear" WITHOUT a trailing space.
(t *testing.T)
| 345 | // TestPopoverTabOnClearCommandHasNoArgSpace: /clear takes no args, so Tab |
| 346 | // completes to "/clear" WITHOUT a trailing space. |
| 347 | func TestPopoverTabOnClearCommandHasNoArgSpace(t *testing.T) { |
| 348 | m := newTestModel(t, func(http.ResponseWriter, *http.Request) {}) |
| 349 | mm := typeInto(m, "/cl") // only /clear matches |
| 350 | if len(mm.suggest) != 1 { |
| 351 | t.Fatalf("precondition: one match for /cl, got %d", len(mm.suggest)) |
| 352 | } |
| 353 | mm2, _ := mm.Update(tea.KeyMsg{Type: tea.KeyTab}) |
| 354 | if got := mm2.(Model).ta.Value(); got != "/clear" { |
| 355 | t.Fatalf("Tab should complete to '/clear' (no trailing space for no-arg cmds), got %q", got) |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | // TestPopoverShiftTabCyclesUp: Shift+Tab walks the selection backwards, |
| 360 | // wrapping at the top. |
nothing calls this directly
no test coverage detected