diff options
author | w0rp <devw0rp@gmail.com> | 2019-05-09 17:26:33 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-05-09 17:26:33 +0100 |
commit | 722c3e8dae80b9cea738ddb3df4f7d066d669e53 (patch) | |
tree | d1fb0f3cfcf0ce094c562181931b738efed730b3 /test/completion | |
parent | bff3d253e9d1de36879c1b2bc1bfdbc5b450d139 (diff) | |
download | ale-722c3e8dae80b9cea738ddb3df4f7d066d669e53.zip |
#2481 - Use text to insert from insertText
Diffstat (limited to 'test/completion')
-rw-r--r-- | test/completion/test_lsp_completion_parsing.vader | 26 |
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', + \ }, + \ ], + \ }, + \ }) |