summaryrefslogtreecommitdiff
path: root/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-08-16 17:04:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-08-16 17:04:25 +0800
commitbe5b77b7956970647d4d12d0e83ccf9bb410565b (patch)
treed5a1e94e71b309524da9f6a4a9fa23c5e2f077b4 /test/crossfile
parentb53c18f1fe69c07c65378892ea42346c593f5023 (diff)
downloadlua-language-server-be5b77b7956970647d4d12d0e83ccf9bb410565b.zip
supports `---@enum (key)`
Diffstat (limited to 'test/crossfile')
-rw-r--r--test/crossfile/hover.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index 617b6f7e..a18c714b 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -1637,6 +1637,30 @@ TEST {
{
path = 'a.lua',
content = [[
+ ---@enum(key) <?A?>
+ local t = {
+ x = 1 << 0,
+ y = 1 << 1,
+ z = 1 << 2,
+ }
+ ]]
+ },
+ hover = [[
+```lua
+(enum) A
+```
+
+---
+
+```lua
+"x" | "y" | "z"
+```]]
+}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
---@alias someType
---| "#" # description