summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion')
-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 = ''
}
}
}