diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-24 15:13:40 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-24 15:13:40 +0800 |
commit | 90d2f4190567891a2497cee80186657d416b19b0 (patch) | |
tree | be8f3d13381ea347e8a605da54c841d19d1e53cb /test | |
parent | 91a09a1f08cbafe60212b13f5c62fa64f0d5ec4d (diff) | |
download | lua-language-server-90d2f4190567891a2497cee80186657d416b19b0.zip |
@method
Diffstat (limited to 'test')
-rw-r--r-- | test/completion/common.lua | 66 |
1 files changed, 66 insertions, 0 deletions
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 = '' + } + } + }, +} |