summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-05 17:29:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-05 17:29:04 +0800
commita6807742cc7128b6eab4a078feac11af4039e1f9 (patch)
treed4f81e153a0e4ee18eceec7b5964997d11974068 /server/test
parent2434cef378cd2a5748356c427cf843a61e925ad9 (diff)
downloadlua-language-server-a6807742cc7128b6eab4a078feac11af4039e1f9.zip
添加测试
Diffstat (limited to 'server/test')
-rw-r--r--server/test/hover/init.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/server/test/hover/init.lua b/server/test/hover/init.lua
index 642b8216..8187f7d3 100644
--- a/server/test/hover/init.lua
+++ b/server/test/hover/init.lua
@@ -285,16 +285,34 @@ local <?t?> = {
[5.5] = 4,
[{}] = 5,
[function () end] = 6,
+ ["b"] = 7,
+ ["012"] = 8,
}
]]
[[
local t: {
+ ["012"]: number = 8,
[*function]: number = 6,
[*table]: number = 5,
[001]: number = 2,
[5.5]: number = 4,
[true]: number = 3,
a: number = 1,
+ b: number = 7,
+}
+]]
+
+TEST [[
+local <?t?> = {}
+t[#t+1] = 1
+t[#t+1] = 1
+
+local any = collectgarbage()
+t[any] = any
+]]
+[[
+local t: {
+ [*number]: number = 1,
}
]]