summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-11-21 18:30:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-11-21 18:30:08 +0800
commit48cdcc1436a81b2890220bae74266d455c6c5dc1 (patch)
treee6ea106dd114efb65bdb8a9bbbc16ab030d136cc /server/test
parentb614e7117cc49a4f78913ffae81b82d2b3fa3bae (diff)
downloadlua-language-server-48cdcc1436a81b2890220bae74266d455c6c5dc1.zip
支持字面量
Diffstat (limited to 'server/test')
-rw-r--r--server/test/definition/table.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/server/test/definition/table.lua b/server/test/definition/table.lua
index 4f5d9095..addf0a66 100644
--- a/server/test/definition/table.lua
+++ b/server/test/definition/table.lua
@@ -25,3 +25,27 @@ local t
t.<!x!> = 1
t.<?x?>()
]]
+
+TEST [[
+local t
+t[<!1!>] = 1
+t[<?1?>]()
+]]
+
+TEST [[
+local t
+t[<!true!>] = 1
+t[<?true?>]()
+]]
+
+TEST [[
+local t
+t[<!"method"!>] = 1
+t[<?"method"?>]()
+]]
+
+TEST [[
+local t
+t[<!"method"!>] = 1
+t[<?[==[method]==]?>]()
+]]