summaryrefslogtreecommitdiff
path: root/test/completion/test_lsp_completion_parsing.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-03-10 15:21:36 +0000
committerw0rp <devw0rp@gmail.com>2019-03-10 15:21:36 +0000
commit03384a5d6f966b28efa136056e8b7b1b4f1c3d89 (patch)
tree8fbbb33ecf314ac1281307eac7d3a6783ff00736 /test/completion/test_lsp_completion_parsing.vader
parent8a0213f1fda005fe436d70e3bcc7b611b73a0855 (diff)
downloadale-03384a5d6f966b28efa136056e8b7b1b4f1c3d89.zip
#2341 - Handle completion messages with textEdit objects
Diffstat (limited to 'test/completion/test_lsp_completion_parsing.vader')
-rw-r--r--test/completion/test_lsp_completion_parsing.vader31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/completion/test_lsp_completion_parsing.vader b/test/completion/test_lsp_completion_parsing.vader
index 71e53ab6..a8e00260 100644
--- a/test/completion/test_lsp_completion_parsing.vader
+++ b/test/completion/test_lsp_completion_parsing.vader
@@ -471,3 +471,34 @@ Execute(Should handle documentation in the markdown format):
\ ],
\ },
\ })
+
+Execute(Should handle completion messages with textEdit objects):
+ 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',
+ \ 'textEdit': {
+ \ 'newText': 'next_callback',
+ \ 'range': {
+ \ 'end': {'character': 13, 'line': 12},
+ \ 'start': {'character': 4, 'line': 12},
+ \ },
+ \ },
+ \ },
+ \ ],
+ \ },
+ \ })