summaryrefslogtreecommitdiff
path: root/test/tclient/tests/multi-workspace.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-09 05:28:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-09 05:28:59 +0800
commitdf58ac0f9dec8fb58950a66ffb10dbe9f5eb4f4b (patch)
tree98b3fb58cd7ebb86d78e5a470b421d62563c8858 /test/tclient/tests/multi-workspace.lua
parentaf4e3094bd5592d2e9d6a769ef1d7a1660b3e48e (diff)
downloadlua-language-server-df58ac0f9dec8fb58950a66ffb10dbe9f5eb4f4b.zip
update
Diffstat (limited to 'test/tclient/tests/multi-workspace.lua')
-rw-r--r--test/tclient/tests/multi-workspace.lua26
1 files changed, 24 insertions, 2 deletions
diff --git a/test/tclient/tests/multi-workspace.lua b/test/tclient/tests/multi-workspace.lua
index 95b53a0b..c4636c53 100644
--- a/test/tclient/tests/multi-workspace.lua
+++ b/test/tclient/tests/multi-workspace.lua
@@ -82,13 +82,13 @@ lclient():start(function (client)
files.setText(rootUri .. '/ws1/unittest.lua', [[
GLOBAL = 1
---@class ZAAA
----@type
+---@type Z
]])
files.setText(rootUri .. '/ws2/unittest.lua', [[
GLOBAL = 2
---@class ZBBB
----@type
+---@type Z
]])
local defs1 = client:awaitRequest('textDocument/definition', {
@@ -112,4 +112,26 @@ GLOBAL = 2
},
})
assert(#defs2 == 1)
+
+ local comps1 = client:awaitRequest('textDocument/completion', {
+ textDocument = {
+ uri = rootUri .. '/ws1/unittest.lua',
+ },
+ position = {
+ line = 2,
+ character = 10,
+ },
+ })
+ assert(#comps1.items == 1)
+
+ local comps2 = client:awaitRequest('textDocument/completion', {
+ textDocument = {
+ uri = rootUri .. '/ws2/unittest.lua',
+ },
+ position = {
+ line = 2,
+ character = 10,
+ },
+ })
+ assert(#comps2.items == 1)
end)