summaryrefslogtreecommitdiff
path: root/server/test/find_lib
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-04 17:42:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-04 17:42:09 +0800
commitcf035623c1e0f6148cd4cee513ce25810d0d137e (patch)
treeb361b920f74e52781b37596670ae81864f2af60b /server/test/find_lib
parent4843133cf08b1a05c506665b5b84bdf6ccbea884 (diff)
downloadlua-language-server-cf035623c1e0f6148cd4cee513ce25810d0d137e.zip
部分library
Diffstat (limited to 'server/test/find_lib')
-rw-r--r--server/test/find_lib/init.lua9
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