summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-11 21:03:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-11 21:03:16 +0800
commitbaecde8be338fbf2118b2064a8d64c1d5734bb9a (patch)
treefc9ff40dc93f87a2ac5be7b7e9267a2da52054fe /test
parent2469dbae153066fad83edcced82f17aee77d0a9f (diff)
downloadlua-language-server-baecde8be338fbf2118b2064a8d64c1d5734bb9a.zip
resolve #1066
dose not show unknown `---@XXX` as description
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/hover.lua72
1 files changed, 72 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index e391014d..43b80f28 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -1237,3 +1237,75 @@ local n: integer
---
comments]]
}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ --- comments
+ ---@type integer
+ local <?n?>
+ ]]
+ },
+ hover = [[
+```lua
+local n: integer
+```
+
+---
+ comments]]
+}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ ---@type integer
+ --- comments
+ local <?n?>
+ ]]
+ },
+ hover = [[
+```lua
+local n: integer
+```
+
+---
+ comments]]
+}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ ---@TODO XXXX
+ ---@type integer @ comments
+ local <?n?>
+ ]]
+ },
+ hover = [[
+```lua
+local n: integer
+```
+
+---
+ comments]]
+}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ ---@type integer @ comments
+ ---@TODO XXXX
+ local <?n?>
+ ]]
+ },
+ hover = [[
+```lua
+local n: integer
+```
+
+---
+ comments]]
+}