summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-27 20:02:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-27 20:02:18 +0800
commitf95cec2d31079134e3bfc35908ed1a6a6f9e7805 (patch)
tree6de2214f5010f4d33e4fb3f7c5030de41989a17e /test
parenta6e7f478d00865750e4be61d581ddd2bbe7e41e8 (diff)
downloadlua-language-server-f95cec2d31079134e3bfc35908ed1a6a6f9e7805.zip
fix hover of some operators
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/hover.lua28
-rw-r--r--test/hover/init.lua7
2 files changed, 35 insertions, 0 deletions
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index e8a718d4..e6517aa9 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -1554,3 +1554,31 @@ TEST {
}
```]]
}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ ---@enum <?A?>
+ local t = {
+ x = 1 << 0,
+ y = 1 << 1,
+ z = 1 << 2,
+ }
+ ]]
+ },
+ hover = [[
+```lua
+(enum) A
+```
+
+---
+
+```lua
+{
+ x: integer = 1,
+ y: integer = 2,
+ z: integer = 4,
+}
+```]]
+}
diff --git a/test/hover/init.lua b/test/hover/init.lua
index 95764923..40474bf5 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -2130,3 +2130,10 @@ local m = {
[[
(enum) A
]]
+
+TEST [[
+local <?x?> = 1 << 2
+]]
+[[
+local x: integer = 4
+]]