summaryrefslogtreecommitdiff
path: root/test/diagnostics/ambiguity-1.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-08-11 16:28:47 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-08-11 17:57:29 +0800
commit6fe0ea884f692a460cdf084c28900fc44dec0018 (patch)
tree68fdfcf8bdaf3c18ab06af2a7a32d6eb3fc1c809 /test/diagnostics/ambiguity-1.lua
parent736e54a8ecaada2dacd0fd0ae35ad03aa75a7149 (diff)
downloadlua-language-server-6fe0ea884f692a460cdf084c28900fc44dec0018.zip
cleanup tests
Diffstat (limited to 'test/diagnostics/ambiguity-1.lua')
-rw-r--r--test/diagnostics/ambiguity-1.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/diagnostics/ambiguity-1.lua b/test/diagnostics/ambiguity-1.lua
new file mode 100644
index 00000000..6b8e41da
--- /dev/null
+++ b/test/diagnostics/ambiguity-1.lua
@@ -0,0 +1,29 @@
+TEST [[
+local x
+x = <!x or 0 + 1!>
+]]
+
+TEST [[
+local x, y
+x = <!x + y or 0!>
+]]
+
+TEST [[
+local x, y, z
+x = x and y or '' .. z
+]]
+
+TEST [[
+local x
+x = x or -1
+]]
+
+TEST [[
+local x
+x = x or (0 + 1)
+]]
+
+TEST [[
+local x, y
+x = (x + y) or 0
+]]