summaryrefslogtreecommitdiff
path: root/test/diagnostics/undefined-global.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/undefined-global.lua
parent736e54a8ecaada2dacd0fd0ae35ad03aa75a7149 (diff)
downloadlua-language-server-6fe0ea884f692a460cdf084c28900fc44dec0018.zip
cleanup tests
Diffstat (limited to 'test/diagnostics/undefined-global.lua')
-rw-r--r--test/diagnostics/undefined-global.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/diagnostics/undefined-global.lua b/test/diagnostics/undefined-global.lua
index f3585d03..55ef5a00 100644
--- a/test/diagnostics/undefined-global.lua
+++ b/test/diagnostics/undefined-global.lua
@@ -9,3 +9,23 @@ print(Z)
print(_G)
Z = 1
]]
+
+TEST [[
+X = table[<!x!>]
+]]
+TEST [[
+T1 = 1
+_ENV.T2 = 1
+_G.T3 = 1
+_ENV._G.T4 = 1
+_G._G._G.T5 = 1
+rawset(_G, 'T6', 1)
+rawset(_ENV, 'T7', 1)
+print(T1)
+print(T2)
+print(T3)
+print(T4)
+print(T5)
+print(T6)
+print(T7)
+]]