summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-29 15:23:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-29 15:23:39 +0800
commit482b3f97443329ebb25b19c2a1152b7b6329a689 (patch)
tree7d84618a44c1f14fa34db0f98fd9dac2c7ae357d /server/test
parent951a555ba103bf762f3332a734944c3931d86173 (diff)
downloadlua-language-server-482b3f97443329ebb25b19c2a1152b7b6329a689.zip
跟进诊断
Diffstat (limited to 'server/test')
-rw-r--r--server/test/diagnostics/init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/test/diagnostics/init.lua b/server/test/diagnostics/init.lua
index 8a2dcf61..acaf3249 100644
--- a/server/test/diagnostics/init.lua
+++ b/server/test/diagnostics/init.lua
@@ -1,5 +1,6 @@
local core = require 'core'
local parser = require 'parser'
+local service = require 'service'
rawset(_G, 'TEST', true)
@@ -38,10 +39,11 @@ end
function TEST(script)
local new_script, target = catch_target(script)
+ local lsp = service()
local ast = parser:ast(new_script)
assert(ast)
local lines = parser:lines(new_script)
- local vm = core.vm(ast)
+ local vm = core.vm(ast, lsp)
assert(vm)
local datas = core.diagnostics(vm, lines, 'test')
local results = {}