From 58a8a075c9a83d5356ef49c6bd6122d7387b92ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 19 Dec 2018 15:20:20 +0800 Subject: =?UTF-8?q?=E6=94=AF=E6=8C=81method=E5=92=8Cdocumentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/completion/init.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'server/test/completion/init.lua') diff --git a/server/test/completion/init.lua b/server/test/completion/init.lua index 31021fac..c0ce7076 100644 --- a/server/test/completion/init.lua +++ b/server/test/completion/init.lua @@ -29,7 +29,12 @@ local CompletionItemKind = { TypeParameter = 25, } +local EXISTS = {} + local function eq(a, b) + if a == EXISTS and b ~= nil then + return true + end local tp1, tp2 = type(a), type(b) if tp1 ~= tp2 then return false @@ -136,6 +141,7 @@ a@ { label = 'assert', kind = CompletionItemKind.Function, + documentation = EXISTS, } } @@ -164,3 +170,18 @@ z@ detail = 'zabc = 1', } } + +TEST [[ +local mt = {} +function mt:get(a, b) + return 1 +end +mt:g@ +]] +{ + { + label = 'get', + kind = CompletionItemKind.Method, + documentation = EXISTS, + } +} -- cgit v1.2.3