summaryrefslogtreecommitdiff
path: root/server-beta/test/definition
diff options
context:
space:
mode:
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)