summaryrefslogtreecommitdiff
path: root/test/completion/common.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-24 16:50:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-24 16:50:52 +0800
commit9143322ddf72876f3c89349e37a62cdf20cf3b65 (patch)
tree88a3229f262f2890acb25fe56d0f6dca5880019f /test/completion/common.lua
parent13123693e692c6bcf1703e2ec4538d940cdc9d2c (diff)
downloadlua-language-server-9143322ddf72876f3c89349e37a62cdf20cf3b65.zip
postifx supports `++` and `++?`
Diffstat (limited to 'test/completion/common.lua')
-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 = ''
+ }
+ }
+ },
+}