From 7b752a3eae03e714911adf5508b9aa27d079d2bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 24 Dec 2018 11:54:12 +0800 Subject: =?UTF-8?q?=E5=BE=97=E8=BD=AC=E4=B9=89=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/crossfile/hover.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/test/crossfile') 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 ', }, hover = { - description = [[[a.lua](file:///C%3A/Users/sunyi/.vscode/extensions/sumneko.lua-language-server/server/a.lua)]], + description = [[[a.lua]($ROOT$/a.lua)]], } } -- cgit v1.2.3