diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-23 22:29:32 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-23 22:29:32 +0800 |
commit | 3d2dfa3775302784b632a7e147d77ff92dfd7346 (patch) | |
tree | e2071774d65b971c196916a963213c5f65e6ce50 /test/completion | |
parent | 14c0ba0ebbf69426cab28c98409fb04aff89a34d (diff) | |
download | lua-language-server-3d2dfa3775302784b632a7e147d77ff92dfd7346.zip |
make VSCode happy
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/common.lua | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua index 2080e12e..7d6ba0c8 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -2766,13 +2766,57 @@ xx@pcall<??> textEdit = { start = 3, finish = 8, - newText = '', + newText = 'pcall(xx)', }, additionalTextEdits = { { start = 0, finish = 3, - newText = 'pcall(xx)' + newText = '' + } + } + } +} + +TEST [[ +xx()@pcall<??> +]] +{ + [1] = { + label = 'pcall', + kind = define.CompletionItemKind.Event, + textEdit = { + start = 5, + finish = 10, + newText = 'pcall(xx)', + }, + additionalTextEdits = { + { + start = 0, + finish = 5, + newText = '' + } + } + } +} + +TEST [[ +xx(1, 2, 3)@pcall<??> +]] +{ + [1] = { + label = 'pcall', + kind = define.CompletionItemKind.Event, + textEdit = { + start = 12, + finish = 17, + newText = 'pcall(xx, 1, 2, 3)', + }, + additionalTextEdits = { + { + start = 0, + finish = 12, + newText = '' } } } |