summaryrefslogtreecommitdiff
path: root/test/crossfile/hover.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/crossfile/hover.lua')
-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
+```]]}