summaryrefslogtreecommitdiff
path: root/test-beta/diagnostics/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-02 20:51:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-02 20:51:42 +0800
commitd2555c83e1e4338f52a740cbd163fed043219888 (patch)
tree1fa03cf6ae92594d2fbb7cf9ce11ad2e40612da8 /test-beta/diagnostics/init.lua
parentededf909f340f582195ba2f88b85787fa3142be1 (diff)
downloadlua-language-server-d2555c83e1e4338f52a740cbd163fed043219888.zip
分步给出诊断结果
Diffstat (limited to 'test-beta/diagnostics/init.lua')
-rw-r--r--test-beta/diagnostics/init.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/test-beta/diagnostics/init.lua b/test-beta/diagnostics/init.lua
index b1801083..3c2790ab 100644
--- a/test-beta/diagnostics/init.lua
+++ b/test-beta/diagnostics/init.lua
@@ -50,7 +50,12 @@ function TEST(script, ...)
files.removeAll()
local new_script, target = catch_target(script, ...)
files.setText('', new_script)
- local datas = core('') or {}
+ local datas = {}
+ core('', function (results)
+ for _, res in ipairs(results) do
+ datas[#datas+1] = res
+ end
+ end)
local results = {}
for i, data in ipairs(datas) do
results[i] = { data.start, data.finish }