summaryrefslogtreecommitdiff
path: root/server/test/hover/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/test/hover/init.lua')
-rw-r--r--server/test/hover/init.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index cda10baa..e5686c9e 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -1,5 +1,6 @@
local parser = require 'parser'
local core = require 'core'
+local buildVM = require 'vm'
rawset(_G, 'TEST', true)
@@ -10,10 +11,10 @@ function TEST(script)
local pos = (start + finish) // 2 + 1
local new_script = script:gsub('<[!?]', ' '):gsub('[!?]>', ' ')
local ast = parser:ast(new_script)
- local vm = core.vm(ast)
+ local vm = buildVM(ast)
assert(vm)
- local result, source = core.findSource(vm, pos)
- local hover = core.hover(result, source)
+ local source = core.findSource(vm, pos)
+ local hover = core.hover(source)
if expect then
assert(hover)
expect = expect:gsub('^[\r\n]*(.-)[\r\n]*$', '%1'):gsub('\r\n', '\n')