From cb1a412bc7c205c73aec3ef2b1f8f8baf4564fb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 20 Aug 2021 17:52:06 +0800 Subject: stash --- test/crossfile/hover.lua | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'test/crossfile') diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index 04f7cc02..08773959 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -68,14 +68,8 @@ function TEST(expect) local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2 local hover = core.byUri(sourceUri, sourcePos) assert(hover) - if hover.label then - hover.label = hover.label:gsub('\r\n', '\n') - end - if hover.description then - hover.description = tostring(hover.description) - end - assert(eq(hover.label, expect.hover.label)) - assert(eq(hover.description, expect.hover.description)) + hover = tostring(hover):gsub('\r\n', '\n') + assert(eq(hover, expect.hover)) end TEST { @@ -87,10 +81,13 @@ TEST { path = 'b.lua', content = 'require ', }, - hover = { - label = '1 个字节', - description = [[* [a.lua](file:///a.lua) (搜索路径: `?.lua`)]], - } + hover = [[ +```lua +1 个字节 +``` + +--- +* [a.lua](file:///a.lua) (搜索路径: `?.lua`)]], } if require 'bee.platform'.OS == 'Windows' then -- cgit v1.2.3