diff options
Diffstat (limited to 'server/test/find_lib/init.lua')
-rw-r--r-- | server/test/find_lib/init.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/test/find_lib/init.lua b/server/test/find_lib/init.lua index eb4686bc..a32a9089 100644 --- a/server/test/find_lib/init.lua +++ b/server/test/find_lib/init.lua @@ -1,5 +1,6 @@ local core = require 'core' -local parser = require 'parser' +local parser = require 'parser' +local buildVM = require 'vm' rawset(_G, 'TEST', true) @@ -11,10 +12,10 @@ function TEST(fullkey) local new_script = script:gsub('<[!?]', ' '):gsub('[!?]>', ' ') local ast = parser:ast(new_script) assert(ast) - local vm = core.vm(ast) + local vm = buildVM(ast) assert(vm) - local result = core.findSource(vm, pos) - local _, name = core.findLib(result) + local source = core.findSource(vm, pos) + local _, name = core.findLib(source) assert(name == fullkey) end end |