diff options
Diffstat (limited to 'server/test/completion/init.lua')
-rw-r--r-- | server/test/completion/init.lua | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index de924bd7..0d34a63b 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -1080,6 +1080,51 @@ f(1, $) TEST [[ ---@param x string | "'AAA'" | "'BBB'" | "'CCC'" +function f(y, x) +end + +f(1,$) +]] +{ + { + label = "'AAA'", + kind = CompletionItemKind.EnumMember, + }, + { + label = "'BBB'", + kind = CompletionItemKind.EnumMember, + }, + { + label = "'CCC'", + kind = CompletionItemKind.EnumMember, + } +} + +TEST [[ +---@param x string | "'AAA'" | "'BBB'" | "'CCC'" +function f(x) +end + +f($) +]] +{ + { + label = "'AAA'", + kind = CompletionItemKind.EnumMember, + }, + { + label = "'BBB'", + kind = CompletionItemKind.EnumMember, + }, + { + label = "'CCC'", + kind = CompletionItemKind.EnumMember, + } +} + +TEST [[ +---@alias Option string | "'AAA'" | "'BBB'" | "'CCC'" +---@param x Option function f(x) end |