summaryrefslogtreecommitdiff
path: root/test/completion/common.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-23 22:29:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-23 22:29:32 +0800
commit3d2dfa3775302784b632a7e147d77ff92dfd7346 (patch)
treee2071774d65b971c196916a963213c5f65e6ce50 /test/completion/common.lua
parent14c0ba0ebbf69426cab28c98409fb04aff89a34d (diff)
downloadlua-language-server-3d2dfa3775302784b632a7e147d77ff92dfd7346.zip
make VSCode happy
Diffstat (limited to 'test/completion/common.lua')
-rw-r--r--test/completion/common.lua48
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 = ''
}
}
}