summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-22 20:46:22 +0800
committersumneko <sumneko@hotmail.com>2019-05-22 20:46:22 +0800
commitbb8aa605fcde6faee6605e0580817e50e09f79f3 (patch)
tree01f401b9e355303150239c2e2d74d866d71f01b7 /server/test
parentde808902586795f0f49badd8df238bb04189c931 (diff)
downloadlua-language-server-bb8aa605fcde6faee6605e0580817e50e09f79f3.zip
emmy枚举值也自动处理字符串
Diffstat (limited to 'server/test')
-rw-r--r--server/test/completion/init.lua31
1 files changed, 31 insertions, 0 deletions
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
@@ -1159,6 +1159,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)
end