summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-10 20:01:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-10 20:01:54 +0800
commita9d694e3d143919bddffaf83b019a6260b209c6b (patch)
tree671eb3376e786ae77e3328e7a1679078fc23bbe9 /server/test
parent44e3577e0c0a63771a3ab773716e83e473233bcb (diff)
downloadlua-language-server-a9d694e3d143919bddffaf83b019a6260b209c6b.zip
更新vm
Diffstat (limited to 'server/test')
-rw-r--r--server/test/vm/init.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/server/test/vm/init.lua b/server/test/vm/init.lua
index db096252..b8b41502 100644
--- a/server/test/vm/init.lua
+++ b/server/test/vm/init.lua
@@ -19,3 +19,41 @@ end
TEST [[
return nil, 1, true, 'xx'
]]
+
+TEST [[
+return a
+]]
+
+TEST [[
+retrun a.b:c()[1][name]
+]]
+
+TEST [[
+return 1 + 1
+]]
+
+TEST [[
+return -1
+]]
+
+TEST [[
+return ...
+]]
+
+TEST [[
+return function (a, b, ...)
+end
+]]
+
+TEST [[
+return {
+ a = 1,
+ b = {
+ c = d,
+ e = f,
+ },
+ g,
+ h,
+ 1,
+}
+]]