summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-10-11 13:46:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-10-11 13:46:55 +0800
commit16af212c379e9927143b37bedebcf884445bfdbd (patch)
tree14d3081d3c719b63a750d283738a3ec1e5b3085e /test
parent6ca08827d3e4e509841ffad2a57f179348ef65c6 (diff)
downloadlua-language-server-16af212c379e9927143b37bedebcf884445bfdbd.zip
until
Diffstat (limited to 'test')
-rw-r--r--test/definition/init.lua59
1 files changed, 59 insertions, 0 deletions
diff --git a/test/definition/init.lua b/test/definition/init.lua
index 61eccfbf..d77acf0c 100644
--- a/test/definition/init.lua
+++ b/test/definition/init.lua
@@ -18,11 +18,21 @@ local <!x!>
]]
test [[
+local z, y, <!x!>
+<?x?> = 1
+]]
+
+test [[
local <!x!> = 1
<?x?> = 1
]]
test [[
+local z, y, <!x!> = 1
+<?x?> = 1
+]]
+
+test [[
function <!x!> () end
<?x?> = 1
]]
@@ -132,3 +142,52 @@ for z, y, <!x!> in x do
<?x?> = 1
end
]]
+
+test [[
+local <!x!>
+while <?x?> do
+end
+]]
+
+test [[
+local <!x!>
+while x do
+ <?x?> = 1
+end
+]]
+
+test [[
+local <!x!>
+while x do
+ local x
+end
+<?x?> = 1
+]]
+
+test [[
+local <!x!>
+repeat
+ <?x?> = 1
+until true
+]]
+
+test [[
+local <!x!>
+repeat
+ local x
+until true
+<?x?> = 1
+]]
+
+test [[
+local <!x!>
+repeat
+until <?x?>
+]]
+
+test [[
+local x
+repeat
+ local <!x!>
+until <?x?>
+]]