summaryrefslogtreecommitdiff
path: root/test-beta/diagnostics/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-29 15:38:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-29 15:38:28 +0800
commitbfaac3b788628dfbd0faa27cafc8973bccab4d10 (patch)
tree5e5c9ed83f8b88b2d1891af7d14cf7973e7f74dd /test-beta/diagnostics/init.lua
parentf737afdef778e4b34d7f9db154068ff5f04de119 (diff)
downloadlua-language-server-bfaac3b788628dfbd0faa27cafc8973bccab4d10.zip
更好的全局变量支持
Diffstat (limited to 'test-beta/diagnostics/init.lua')
-rw-r--r--test-beta/diagnostics/init.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/test-beta/diagnostics/init.lua b/test-beta/diagnostics/init.lua
index 8f1bb2c6..9a048ea9 100644
--- a/test-beta/diagnostics/init.lua
+++ b/test-beta/diagnostics/init.lua
@@ -562,11 +562,19 @@ local <!t!> = {}
TEST [[
T1 = 1
-_ENV.T2 = 2
-_G.T3 = 2
+_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)
]]
--TEST [[