diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-07-01 23:29:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-01 23:29:24 +0200 |
| commit | 7df95f9b208ba7228a25e7f75fb4cc02d6604cce (patch) | |
| tree | e4933fb547bc886f27f06011a6c4780facfd7642 /lua/tests | |
| parent | 1aa74b231c6f93152c4ac51549a0563dca9b4453 (diff) | |
| parent | e778abfdb457cc47ca47ce9b76905e043e87e598 (diff) | |
Merge pull request #1945 from nvim-telescope/dev
full changelog `:help telescope.changelog-1945`
Diffstat (limited to 'lua/tests')
| -rw-r--r-- | lua/tests/automated/resolver_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lua/tests/automated/resolver_spec.lua b/lua/tests/automated/resolver_spec.lua index 0251ec0..f30a323 100644 --- a/lua/tests/automated/resolver_spec.lua +++ b/lua/tests/automated/resolver_spec.lua @@ -75,6 +75,14 @@ describe("telescope.config.resolve", function() end end) + it("should handle percentages with min/max boundary", function() + eq(20, resolve.resolve_width { 0.1, min = 20 }(nil, 40, 120)) + eq(30, resolve.resolve_height { 0.1, min = 20 }(nil, 40, 300)) + + eq(24, resolve.resolve_width { 0.4, max = 80 }(nil, 60, 60)) + eq(80, resolve.resolve_height { 0.4, max = 80 }(nil, 60, 300)) + end) + it("should handle fixed size", function() local fixed = { 5, 8, 13, 21, 34 } for _, s in ipairs(test_sizes) do |
