diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 11:54:12 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 11:54:12 +0800 |
commit | 7b752a3eae03e714911adf5508b9aa27d079d2bb (patch) | |
tree | 98d3e90964ee6ef3775048439e5d82c8010fc785 | |
parent | 878e33a5d363b5471d26096691d4203d33d15b40 (diff) | |
download | lua-language-server-7b752a3eae03e714911adf5508b9aa27d079d2bb.zip |
得转义一下
-rw-r--r-- | server/test/crossfile/hover.lua | 5 |
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)]], } } |