summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-05-09 17:26:33 +0100
committerw0rp <devw0rp@gmail.com>2019-05-09 17:26:33 +0100
commit722c3e8dae80b9cea738ddb3df4f7d066d669e53 (patch)
treed1fb0f3cfcf0ce094c562181931b738efed730b3 /test/completion
parentbff3d253e9d1de36879c1b2bc1bfdbc5b450d139 (diff)
downloadale-722c3e8dae80b9cea738ddb3df4f7d066d669e53.zip
#2481 - Use text to insert from insertText
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/test_lsp_completion_parsing.vader26
1 files changed, 25 insertions, 1 deletions
diff --git a/test/completion/test_lsp_completion_parsing.vader b/test/completion/test_lsp_completion_parsing.vader
index a8e00260..ef954564 100644
--- a/test/completion/test_lsp_completion_parsing.vader
+++ b/test/completion/test_lsp_completion_parsing.vader
@@ -486,7 +486,7 @@ Execute(Should handle completion messages with textEdit objects):
\ {
\ 'detail': 'PlayTimeCallback',
\ 'filterText': 'next_callback',
- \ 'insertText': 'next_callback',
+ \ 'insertText': 'ignoreme',
\ 'insertTextFormat': 1,
\ 'kind': 6,
\ 'label': ' next_callback',
@@ -502,3 +502,27 @@ Execute(Should handle completion messages with textEdit objects):
\ ],
\ },
\ })
+
+Execute(Should handle completion messages with the deprecated insertText attribute):
+ AssertEqual
+ \ [
+ \ {'word': 'next_callback', 'menu': 'PlayTimeCallback', 'info': '', 'kind': 'v', 'icase': 1},
+ \ ],
+ \ ale#completion#ParseLSPCompletions({
+ \ 'id': 226,
+ \ 'jsonrpc': '2.0',
+ \ 'result': {
+ \ 'isIncomplete': v:false,
+ \ 'items': [
+ \ {
+ \ 'detail': 'PlayTimeCallback',
+ \ 'filterText': 'next_callback',
+ \ 'insertText': 'next_callback',
+ \ 'insertTextFormat': 1,
+ \ 'kind': 6,
+ \ 'label': ' next_callback',
+ \ 'sortText': '3ee19999next_callback',
+ \ },
+ \ ],
+ \ },
+ \ })