From 95ea163397963b52278b9eb70f2adfebe5490014 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, 23 Aug 2021 11:27:28 +0800 Subject: resolve #586 improve showing multi comments at enums --- test/crossfile/hover.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'test') diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua index 2ceeb597..a877d226 100644 --- a/test/crossfile/hover.lua +++ b/test/crossfile/hover.lua @@ -954,3 +954,34 @@ local t: string|fun():string function t() -> string ```]]} + +TEST {{ path = 'a.lua', content = '', }, { + path = 'b.lua', + content = [[ +---@alias T +---comment 1 +---comment 2 +---| 'a' +---comment 3 +---comment 4 +---| 'b' + +---@param p T +local function (p) +end +]] +}, +hover = [[ +```lua +function f(p: a|b) +``` + +--- + +```lua +p: T + | a -- comment 1 + -- comment 2 + | b -- comment 3 + -- comment 4 +```]]} -- cgit v1.2.3