diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-02-24 02:41:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-24 02:41:00 +0100 |
| commit | 10627e889e82a82560b6fc48ea0ca20e1963d07f (patch) | |
| tree | b6c6a782184f3c60ce5ad7e4636cba93c005fae2 /lua/tests | |
| parent | 4dd35ef0e154ab1836fc923a33196a4101a97a9c (diff) | |
feat: advanced normal mode (#463)
Add <count>j and k to normal mode and H and L to jump at top and bottom of displayed results
Diffstat (limited to 'lua/tests')
| -rw-r--r-- | lua/tests/automated/scroller_spec.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lua/tests/automated/scroller_spec.lua b/lua/tests/automated/scroller_spec.lua index dcc55a0..98233b4 100644 --- a/lua/tests/automated/scroller_spec.lua +++ b/lua/tests/automated/scroller_spec.lua @@ -111,4 +111,22 @@ describe('scroller', function() eq(0, scroller(23, 112, 23)) end) end) + + describe('should give top and bottom index', function() + it('should handle ascending', function() + eq(0, p_scroller.top('ascending', 20, 1000)) + eq(19, p_scroller.bottom('ascending', 20, 1000)) + + eq(0, p_scroller.top('ascending', 20, 10)) + eq(9, p_scroller.bottom('ascending', 20, 10)) + end) + + it('should handle descending', function() + eq(0, p_scroller.top('descending', 20, 1000)) + eq(19, p_scroller.bottom('descending', 20, 1000)) + + eq(10, p_scroller.top('descending', 20, 10)) + eq(19, p_scroller.bottom('descending', 20, 10)) + end) + end) end) |
