summaryrefslogtreecommitdiff
path: root/server/test/hover/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-21 17:02:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-21 17:02:11 +0800
commit6dca52b18108d11ab08a8b951eb98115c06b5640 (patch)
tree3af239bf4a215f3eeae782358735ff6b09459b2b /server/test/hover/init.lua
parent37c2648b16aca6585c63ca352eba2e1d09bf2e91 (diff)
downloadlua-language-server-6dca52b18108d11ab08a8b951eb98115c06b5640.zip
参数名
Diffstat (limited to 'server/test/hover/init.lua')
-rw-r--r--server/test/hover/init.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index 81057039..5d0cb068 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -13,11 +13,11 @@ function TEST(script)
local vm = matcher.vm(ast)
assert(vm)
local result, source = matcher.findResult(vm, pos)
- local results = matcher.hover(result, source)
- assert(result)
+ local hover = matcher.hover(result, source)
+ assert(hover)
expect = expect:gsub('^[\r\n]*(.-)[\r\n]*$', '%1'):gsub('\r\n', '\n')
- local result = results[1]:gsub('^[\r\n]*(.-)[\r\n]*$', '%1'):gsub('\r\n', '\n')
- assert(expect == result)
+ local label = hover.label:gsub('^[\r\n]*(.-)[\r\n]*$', '%1'):gsub('\r\n', '\n')
+ assert(expect == label)
end
end