summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-24 11:54:12 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-24 11:54:12 +0800
commit7b752a3eae03e714911adf5508b9aa27d079d2bb (patch)
tree98d3e90964ee6ef3775048439e5d82c8010fc785 /server
parent878e33a5d363b5471d26096691d4203d33d15b40 (diff)
downloadlua-language-server-7b752a3eae03e714911adf5508b9aa27d079d2bb.zip
得转义一下
Diffstat (limited to 'server')
-rw-r--r--server/test/crossfile/hover.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua
index 59ad4fe1..8bcc9411 100644
--- a/server/test/crossfile/hover.lua
+++ b/server/test/crossfile/hover.lua
@@ -75,6 +75,9 @@ function TEST(data)
local result, source = matcher.findResult(sourceVM, sourcePos)
local hover = matcher.hover(result, source, lsp)
assert(hover)
+ if data.hover.description then
+ data.hover.description = data.hover.description:gsub('%$ROOT%$', ws:uriEncode(ROOT):gsub('%%', '%%%%'))
+ end
assert(eq(hover, data.hover))
end
@@ -88,7 +91,7 @@ TEST {
content = 'require <?"a"?>',
},
hover = {
- description = [[[a.lua](file:///C%3A/Users/sunyi/.vscode/extensions/sumneko.lua-language-server/server/a.lua)]],
+ description = [[[a.lua]($ROOT$/a.lua)]],
}
}