summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/completion/common.lua66
1 files changed, 66 insertions, 0 deletions
diff --git a/test/completion/common.lua b/test/completion/common.lua
index 0dfabb07..d3e56616 100644
--- a/test/completion/common.lua
+++ b/test/completion/common.lua
@@ -2887,3 +2887,69 @@ xx(1, 2, 3)@xpcall<??>
}
},
}
+
+TEST [[
+xx@function<??>
+]]
+{
+ [1] = {
+ label = 'function',
+ kind = define.CompletionItemKind.Event,
+ textEdit = {
+ start = 3,
+ finish = 11,
+ newText = 'function xx($1)\n\t$0\nend',
+ },
+ additionalTextEdits = {
+ {
+ start = 0,
+ finish = 3,
+ newText = ''
+ }
+ }
+ },
+}
+
+TEST [[
+xx.yy@method<??>
+]]
+{
+ [1] = {
+ label = 'method',
+ kind = define.CompletionItemKind.Event,
+ textEdit = {
+ start = 6,
+ finish = 12,
+ newText = 'function xx:yy($1)\n\t$0\nend',
+ },
+ additionalTextEdits = {
+ {
+ start = 0,
+ finish = 6,
+ newText = ''
+ }
+ }
+ },
+}
+
+TEST [[
+xx:yy@method<??>
+]]
+{
+ [1] = {
+ label = 'method',
+ kind = define.CompletionItemKind.Event,
+ textEdit = {
+ start = 6,
+ finish = 12,
+ newText = 'function xx:yy($1)\n\t$0\nend',
+ },
+ additionalTextEdits = {
+ {
+ start = 0,
+ finish = 6,
+ newText = ''
+ }
+ }
+ },
+}