aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/plugin/lsp_spec.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 4863873699..614c49a41f 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -3529,7 +3529,7 @@ describe('LSP', function()
)
end)
- it('considers title when computing width', function()
+ it('considers string title when computing width', function()
eq(
{ 17, 2 },
exec_lua(function()
@@ -3542,6 +3542,20 @@ describe('LSP', function()
end)
)
end)
+
+ it('considers [string,string][] title when computing width', function()
+ eq(
+ { 17, 2 },
+ exec_lua(function()
+ return {
+ vim.lsp.util._make_floating_popup_size(
+ { 'foo', 'bar' },
+ { title = { { 'A very ', 'Normal' }, { 'long title', 'Normal' } } }
+ ),
+ }
+ end)
+ )
+ end)
end)
describe('lsp.util.trim.trim_empty_lines', function()