diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/common.lua | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index 98901a98..23b3eff6 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -3635,3 +3635,65 @@ local t = { textEdit = EXISTS, }, } + +TEST [[ +---@enum A +T = { + x = 1, + y = 'ss', +} + +---@param x A +local function f(x) end + +f(<??>) +]] +{ + { + label = 'T.x', + kind = define.CompletionItemKind.EnumMember, + }, + { + label = 'T.y', + kind = define.CompletionItemKind.EnumMember, + }, + { + label = '1', + kind = define.CompletionItemKind.EnumMember, + }, + { + label = '"ss"', + kind = define.CompletionItemKind.EnumMember, + }, +} + +TEST [[ +---@enum A +local ppp = { + x = 1, + y = 'ss', +} + +---@param x A +local function f(x) end + +f(<??>) +]] +{ + { + label = 'ppp.x', + kind = define.CompletionItemKind.EnumMember, + }, + { + label = 'ppp.y', + kind = define.CompletionItemKind.EnumMember, + }, + { + label = '1', + kind = define.CompletionItemKind.EnumMember, + }, + { + label = '"ss"', + kind = define.CompletionItemKind.EnumMember, + }, +} |