From 90d2f4190567891a2497cee80186657d416b19b0 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, 24 Nov 2021 15:13:40 +0800 Subject: @method --- test/completion/common.lua | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) (limited to 'test/completion') diff --git a/test/completion/common.lua b/test/completion/common.lua index 0dfabb07..d3e56616 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -2887,3 +2887,69 @@ xx(1, 2, 3)@xpcall } }, } + +TEST [[ +xx@function +]] +{ + [1] = { + label = 'function', + kind = define.CompletionItemKind.Event, + textEdit = { + start = 3, + finish = 11, + newText = 'function xx($1)\n\t$0\nend', + }, + additionalTextEdits = { + { + start = 0, + finish = 3, + newText = '' + } + } + }, +} + +TEST [[ +xx.yy@method +]] +{ + [1] = { + label = 'method', + kind = define.CompletionItemKind.Event, + textEdit = { + start = 6, + finish = 12, + newText = 'function xx:yy($1)\n\t$0\nend', + }, + additionalTextEdits = { + { + start = 0, + finish = 6, + newText = '' + } + } + }, +} + +TEST [[ +xx:yy@method +]] +{ + [1] = { + label = 'method', + kind = define.CompletionItemKind.Event, + textEdit = { + start = 6, + finish = 12, + newText = 'function xx:yy($1)\n\t$0\nend', + }, + additionalTextEdits = { + { + start = 0, + finish = 6, + newText = '' + } + } + }, +} -- cgit v1.2.3