From df58ac0f9dec8fb58950a66ffb10dbe9f5eb4f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 9 Apr 2022 05:28:59 +0800 Subject: update --- test/tclient/tests/multi-workspace.lua | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'test/tclient/tests/multi-workspace.lua') 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) -- cgit v1.2.3