aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/plugin/lsp/diagnostic_spec.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/functional/plugin/lsp/diagnostic_spec.lua b/test/functional/plugin/lsp/diagnostic_spec.lua
index 11b2beba7a..3a676359ab 100644
--- a/test/functional/plugin/lsp/diagnostic_spec.lua
+++ b/test/functional/plugin/lsp/diagnostic_spec.lua
@@ -68,20 +68,23 @@ describe('vim.lsp.diagnostic', function()
describe('vim.lsp.diagnostic', function()
describe('handle_publish_diagnostics', function()
it('should be able to retrieve diagnostics from all buffers and clients', function()
- eq(3, exec_lua [[
+ local result = exec_lua [[
vim.lsp.diagnostic.save(
{
make_error('Diagnostic #1', 1, 1, 1, 1),
make_error('Diagnostic #2', 2, 1, 2, 1),
- }, 0, 1
+ }, 1, 1
)
vim.lsp.diagnostic.save(
{
make_error('Diagnostic #3', 3, 1, 3, 1),
- }, 1, 2
+ }, 2, 2
)
- return #vim.lsp.diagnostic.get_all()
- ]])
+ return vim.lsp.diagnostic.get_all()
+ ]]
+ eq(2, #result)
+ eq(2, #result[1])
+ eq('Diagnostic #1', result[1][1].message)
end)
it('should be able to save and count a single client error', function()
eq(1, exec_lua [[
@@ -153,7 +156,6 @@ describe('vim.lsp.diagnostic', function()
}
]])
end)
-
it('should handle one server clearing highlights while the other still has highlights', function()
-- 1 Error (1)
-- 1 Warning (2)