summaryrefslogtreecommitdiff
path: root/server/test/hover/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-12 21:40:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-12 21:40:46 +0800
commit6ac49a2eed8563c26d46456ab97952afad809d1d (patch)
tree9e9140745b926e65a8239533c50fee5c5aa81f78 /server/test/hover/init.lua
parent81bbbb5ae95c727cc8021a7b7f9fb2487c26281a (diff)
downloadlua-language-server-6ac49a2eed8563c26d46456ab97952afad809d1d.zip
hover搜索class
Diffstat (limited to 'server/test/hover/init.lua')
-rw-r--r--server/test/hover/init.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index e3ad7be2..8c4e916d 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -102,3 +102,38 @@ t = {}
t.<?x?> = 1
]]
"global field: number"
+
+TEST [[
+local mt = {}
+mt.__name = 'class'
+
+local <?obj?> = setmetatable({}, mt)
+]]
+"local: *class"
+
+TEST [[
+local mt = {}
+mt.name = 'class'
+mt.__index = mt
+
+local <?obj?> = setmetatable({}, mt)
+]]
+"local: *class"
+
+TEST [[
+local mt = {}
+mt.TYPE = 'class'
+mt.__index = mt
+
+local <?obj?> = setmetatable({}, mt)
+]]
+"local: *class"
+
+TEST [[
+local mt = {}
+mt.Class = 'class'
+mt.__index = mt
+
+local <?obj?> = setmetatable({}, mt)
+]]
+"local: *class"