diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-20 15:23:26 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-20 15:23:26 +0800 |
commit | 437bae522a28cd0def7427edb0484d56e4834c7b (patch) | |
tree | 782ad14403cba74a307ae49f18996f5590261c33 /test | |
parent | c4044b699153057690be5fa599cc415a144c120c (diff) | |
download | lua-language-server-437bae522a28cd0def7427edb0484d56e4834c7b.zip |
fix
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/common.lua | 23 |
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, <??>) ]] |