From bb8aa605fcde6faee6605e0580817e50e09f79f3 Mon Sep 17 00:00:00 2001 From: sumneko Date: Wed, 22 May 2019 20:46:22 +0800 Subject: =?UTF-8?q?emmy=E6=9E=9A=E4=B8=BE=E5=80=BC=E4=B9=9F=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=A4=84=E7=90=86=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/completion/init.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'server/test') diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index fee69e74..b649e1a8 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -1158,6 +1158,37 @@ f($) } } +TEST [[ +---@param x string | "'AAA'" | "'BBB'" | "'CCC'" +function f(x) +end + +f('$') +]] +{ + { + label = "AAA", + filterText = 'AAA', + kind = CompletionItemKind.EnumMember, + textEdit = EXISTS, + additionalTextEdits = EXISTS, + }, + { + label = "BBB", + filterText = 'BBB', + kind = CompletionItemKind.EnumMember, + textEdit = EXISTS, + additionalTextEdits = EXISTS, + }, + { + label = "CCC", + filterText = 'CCC', + kind = CompletionItemKind.EnumMember, + textEdit = EXISTS, + additionalTextEdits = EXISTS, + } +} + TEST [[ ---@param x function | 'function () end' function f(x) -- cgit v1.2.3