From 437bae522a28cd0def7427edb0484d56e4834c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 20 Oct 2022 15:23:26 +0800 Subject: fix --- test/completion/common.lua | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'test') 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, ) ]] -- cgit v1.2.3