summaryrefslogtreecommitdiff
path: root/server-beta/test/definition
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-24 21:41:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-24 21:41:04 +0800
commitc025849321b444b84eacd4e091cfa574ca6bc472 (patch)
tree64fc82e658edb6b1ab9e65b47ad1b877569d7d4f /server-beta/test/definition
parentff4f52962550da919b737f0f78bbaa4a507d6ba9 (diff)
downloadlua-language-server-c025849321b444b84eacd4e091cfa574ca6bc472.zip
更新 definition
Diffstat (limited to 'server-beta/test/definition')
-rw-r--r--server-beta/test/definition/init.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/server-beta/test/definition/init.lua b/server-beta/test/definition/init.lua
index 5a80273c..b9e9ec2a 100644
--- a/server-beta/test/definition/init.lua
+++ b/server-beta/test/definition/init.lua
@@ -42,8 +42,12 @@ function TEST(script)
local ast = parser:compile(new_script, 'lua', 'Lua 5.3')
assert(ast)
- local positions = core(ast, new_script, pos)
- if positions then
+ local results = core(ast, new_script, pos)
+ if results then
+ local positions = {}
+ for i, result in ipairs(results) do
+ positions[i] = { result.target.start, result.target.finish }
+ end
assert(founded(target, positions))
else
assert(#target == 0)