summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-23 11:27:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-23 11:27:28 +0800
commit95ea163397963b52278b9eb70f2adfebe5490014 (patch)
tree8cd178749946547ff736b46a06bcaa2d79372fb0 /test
parent28e63e50c48126f2438d1ea5f5163352a27bfbcf (diff)
downloadlua-language-server-95ea163397963b52278b9eb70f2adfebe5490014.zip
resolve #586 improve showing multi comments at enums
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/hover.lua31
1 files changed, 31 insertions, 0 deletions
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 <?f?>(p)
+end
+]]
+},
+hover = [[
+```lua
+function f(p: a|b)
+```
+
+---
+
+```lua
+p: T
+ | a -- comment 1
+ -- comment 2
+ | b -- comment 3
+ -- comment 4
+```]]}