diff options
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/crossfile/completion.lua | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua index 0ad6cd21..e63c8384 100644 --- a/server/test/crossfile/completion.lua +++ b/server/test/crossfile/completion.lua @@ -106,10 +106,10 @@ function TEST(data) end lsp:saveText(uri, 1, script) ws:addFile(uri) - end - while lsp._needCompile[1] do - lsp:compileVM(lsp._needCompile[1]) + while lsp._needCompile[1] do + lsp:compileVM(lsp._needCompile[1]) + end end local vm = lsp:loadVM(mainUri) @@ -339,3 +339,32 @@ TEST { }, } } + +TEST { + { + path = 'a.lua', + content = [[ + abc = 1 + ]] + }, + { + path = 'a.lua', + content = [[ + abcdef = 1 + ]] + }, + { + path = 'b.lua', + content = [[ + ab@ + ]], + main = true, + }, + completion = { + { + label = 'abcdef', + kind = CompletionItemKind.Enum, + detail = '= 1', + }, + } +} |