summaryrefslogtreecommitdiff
path: root/server-beta/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-22 17:39:47 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-22 17:39:47 +0800
commite92ea4b611e8291a2b6ae6904147917179140fae (patch)
tree4bc372c345d58ba78ee14365f3a296cd48dcbb66 /server-beta/test
parent4b3d9412560935d11e63487d6be7d3bfb8b11b91 (diff)
downloadlua-language-server-e92ea4b611e8291a2b6ae6904147917179140fae.zip
require路径跳转
Diffstat (limited to 'server-beta/test')
-rw-r--r--server-beta/test/crossfile/definition.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/server-beta/test/crossfile/definition.lua b/server-beta/test/crossfile/definition.lua
index 630539d2..74e0333c 100644
--- a/server-beta/test/crossfile/definition.lua
+++ b/server-beta/test/crossfile/definition.lua
@@ -81,7 +81,15 @@ function TEST(datas)
local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2
local positions = core(sourceAst, sourcePos)
if positions then
- assert(founded(targetList, positions))
+ local result = {}
+ for i, position in ipairs(positions) do
+ result[i] = {
+ position.target.start,
+ position.target.finish,
+ position.uri,
+ }
+ end
+ assert(founded(targetList, result))
else
assert(#targetList == 0)
end