(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestLessModel_FollowToggle(t *testing.T) { |
| 154 | m := NewLessModel() |
| 155 | m.SetSize(80, 24) |
| 156 | m.SetContent("line1\nline2", "Test") |
| 157 | |
| 158 | if m.following { |
| 159 | t.Fatal("expected not following initially") |
| 160 | } |
| 161 | |
| 162 | m, _ = m.Update(tea.KeyPressMsg{Code: 'f'}) |
| 163 | if !m.following { |
| 164 | t.Fatal("expected following after f") |
| 165 | } |
| 166 | |
| 167 | m, _ = m.Update(tea.KeyPressMsg{Code: 'f'}) |
| 168 | if m.following { |
| 169 | t.Fatal("expected not following after second f") |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | func TestQuickPeekModel_SpaceCloses(t *testing.T) { |
| 174 | m := NewQuickPeekModel() |
nothing calls this directly
no test coverage detected