summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-19 14:57:38 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-19 14:57:38 +0800
commit2c5cfd138ace486e36960a018e39d1b9c52cabc1 (patch)
treea34318a779df76ce7d7de527ddfbdaa2a3bd425d /server/test
parentb48a27f639dd08a128bcaf0eb56fb5c949da4f91 (diff)
downloadlua-language-server-2c5cfd138ace486e36960a018e39d1b9c52cabc1.zip
hover的result在外面算
Diffstat (limited to 'server/test')
-rw-r--r--server/test/hover/init.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index a11dff45..8177713e 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -12,7 +12,8 @@ function TEST(script)
local ast = parser:ast(new_script)
local vm = matcher.vm(ast)
assert(vm)
- local result = matcher.hover(vm, pos)
+ local result, source = matcher.findResult(vm, pos)
+ local result = matcher.hover(vm, result, source)
assert(result)
expect = expect:gsub('^[\r\n]*(.-)[\r\n]*$', '%1'):gsub('\r\n', '\n')
result = result:gsub('```lua[\r\n]*', ''):gsub('[\r\n]*```', ''):gsub('^[\r\n]*(.-)[\r\n]*$', '%1'):gsub('\r\n', '\n')