summaryrefslogtreecommitdiff
path: root/test/diagnostics/unbalanced-assignments.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-08-11 17:05:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-08-11 17:57:29 +0800
commitcd370225fc4eaf6e2f6baadfb5a8501943c86783 (patch)
treea9f0bf348e310c177e14a946b510759193ecfcd1 /test/diagnostics/unbalanced-assignments.lua
parent6fe0ea884f692a460cdf084c28900fc44dec0018 (diff)
downloadlua-language-server-cd370225fc4eaf6e2f6baadfb5a8501943c86783.zip
cleanup tests
Diffstat (limited to 'test/diagnostics/unbalanced-assignments.lua')
-rw-r--r--test/diagnostics/unbalanced-assignments.lua34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/diagnostics/unbalanced-assignments.lua b/test/diagnostics/unbalanced-assignments.lua
new file mode 100644
index 00000000..a0d47f56
--- /dev/null
+++ b/test/diagnostics/unbalanced-assignments.lua
@@ -0,0 +1,34 @@
+TEST [[
+local x, <!y!>, <!z!> = 1
+]]
+
+TEST [[
+local x, y, <!z!> = 1, 2
+]]
+
+TEST [[
+local x, y, z = print()
+]]
+
+TEST [[
+local x, y, z
+]]
+
+TEST [[
+local x, y, z
+x, <!y!>, <!z!> = 1
+]]
+
+TEST [[
+X, <!Y!>, <!Z!> = 1
+]]
+
+TEST [[
+T = {}
+T.x, <!T.y!>, <!T.z!> = 1
+]]
+
+TEST [[
+T = {}
+T['x'], <!T['y']!>, <!T['z']!> = 1
+]]