summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/common.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index d3e56616..2bfc69a2 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -2953,3 +2953,41 @@ xx:yy@method<??>
}
},
}
+
+TEST [[
+xx++<??>
+]]
+{
+ [1] = {
+ label = '++',
+ kind = define.CompletionItemKind.Event,
+ textEdit = {
+ start = 2,
+ finish = 4,
+ newText = 'xx = xx + 1',
+ },
+ additionalTextEdits = {
+ {
+ start = 0,
+ finish = 2,
+ newText = ''
+ }
+ }
+ },
+ [2] = {
+ label = '++?',
+ kind = define.CompletionItemKind.Event,
+ textEdit = {
+ start = 2,
+ finish = 4,
+ newText = 'xx = (xx or 0) + 1',
+ },
+ additionalTextEdits = {
+ {
+ start = 0,
+ finish = 2,
+ newText = ''
+ }
+ }
+ },
+}