summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 9f5e5f6f..c63ffa7a 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -1069,7 +1069,7 @@ t['<??>']
}
TEST [[
-_ENV['z.b.c'] = {}
+_G['z.b.c'] = {}
z<??>
]]
@@ -1085,6 +1085,27 @@ z<??>
},
}
+config.set(nil, 'Lua.runtime.version', 'Lua 5.1')
+
+TEST [[
+_G['z.b.c'] = {}
+
+z<??>
+]]
+{
+ {
+ label = 'z.b.c',
+ kind = define.CompletionItemKind.Field,
+ textEdit = {
+ start = 20000,
+ finish = 20001,
+ newText = '_G["z.b.c"]',
+ },
+ },
+}
+
+config.set(nil, 'Lua.runtime.version', 'Lua 5.4')
+
TEST [[
io.close(1, <??>)
]]