diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 14:09:54 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-26 14:09:54 +0800 |
commit | 72382639d52d66de5807157fea232646d27f9554 (patch) | |
tree | b586516742f972a6eaa31e7f431448bd0486f872 /server/test/crossfile | |
parent | ca498542d4424322e2172425ab02a8986deb477b (diff) | |
download | lua-language-server-72382639d52d66de5807157fea232646d27f9554.zip |
修正无法跨文件看到对方表里数据的问题
Diffstat (limited to 'server/test/crossfile')
-rw-r--r-- | server/test/crossfile/completion.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua index 15b19176..7d4513ba 100644 --- a/server/test/crossfile/completion.lua +++ b/server/test/crossfile/completion.lua @@ -217,3 +217,41 @@ TEST { }, } } + +TEST { + { + path = 'a.lua', + content = [[ + return { + a = 1, + b = 2, + c = 3, + } + ]] + }, + { + path = 'b.lua', + content = [[ + local t = require 'a' + t.@ + ]], + main = true, + }, + completion = { + { + label = 'a', + kind = CompletionItemKind.Enum, + detail = '= 1', + }, + { + label = 'b', + kind = CompletionItemKind.Enum, + detail = '= 2', + }, + { + label = 'c', + kind = CompletionItemKind.Enum, + detail = '= 3', + }, + } +} |