summaryrefslogtreecommitdiff
path: root/lua/tests/automated/scroller_spec.lua
diff options
context:
space:
mode:
authorTJ DeVries <devries.timothyj@gmail.com>2021-01-11 13:29:37 -0500
committerGitHub <noreply@github.com>2021-01-11 13:29:37 -0500
commit8783bea06e1e0dfa8dfd4834058923088471d832 (patch)
tree050096ba649a94bb01e7c0b3a029e9b4eb060029 /lua/tests/automated/scroller_spec.lua
parentde80a9837cd1d207981c1f6dbf504436f8bfee13 (diff)
feat: quickfix (#293)
* feat: quickfix (not implemented) * [WIP]: Wed 09 Dec 2020 11:11:30 PM EST * somewhat working linked list impl * getting closer * might be working * might be working for real * works and implemented basic example * dont forget to close prompt * fix descending and add more tests * test fixes * fix test * more logging * Fix some more tests * Fix logging messing up tests * fix: lint * fix: multi select stuffs
Diffstat (limited to 'lua/tests/automated/scroller_spec.lua')
-rw-r--r--lua/tests/automated/scroller_spec.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/lua/tests/automated/scroller_spec.lua b/lua/tests/automated/scroller_spec.lua
index f47edda..dcc55a0 100644
--- a/lua/tests/automated/scroller_spec.lua
+++ b/lua/tests/automated/scroller_spec.lua
@@ -99,7 +99,16 @@ describe('scroller', function()
it('should stay at current results when current results is less than max_results', function()
local current = 5
- eq(current - 1, limit_scroller(max_results, current, 4))
+ eq(max_results - current, limit_scroller(max_results, current, 4))
+ end)
+ end)
+
+ describe('https://github.com/nvim-telescope/telescope.nvim/pull/293#issuecomment-751463224', function()
+ it('should handle having many more results than necessary', function()
+ local scroller = p_scroller.create('cycle', 'descending')
+
+ -- 23 112 23
+ eq(0, scroller(23, 112, 23))
end)
end)
end)