summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-05 16:46:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-05 16:46:08 +0800
commitc9b94234048a9608a732e85251757d02fcf19c8a (patch)
treedc95e70c233ab72e46e8bcb1fe7b9d8f6731886e /test/diagnostics
parent2877f084943ba30a9970cbe9a5cb0be844a2ec64 (diff)
downloadlua-language-server-c9b94234048a9608a732e85251757d02fcf19c8a.zip
cleanup
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/init.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index 2821dc1b..e20c129c 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -31,16 +31,10 @@ function TEST(script, ...)
local newScript, catched = catch(script, '!')
files.setText('', newScript)
files.open('')
- 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 }
- end
+ core('', function (result)
+ results[#results+1] = { result.start, result.finish }
+ end)
if results[1] then
if not founded(catched['!'] or {}, results) then