diff options
author | w0rp <devw0rp@gmail.com> | 2020-08-07 10:54:38 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-08-07 10:54:38 +0100 |
commit | 9bdabce8dffa54791aff8c97f46d0f8ab5acbf24 (patch) | |
tree | d90398c3a60651361b0b98ec57fa8a176046be87 /test/lsp/test_other_initialize_message_handling.vader | |
parent | 667618b399d820865751ca7cc4e8fce344384510 (diff) | |
download | ale-9bdabce8dffa54791aff8c97f46d0f8ab5acbf24.zip |
Fix #2907 - Handle dictionaries for capabilities
Diffstat (limited to 'test/lsp/test_other_initialize_message_handling.vader')
-rw-r--r-- | test/lsp/test_other_initialize_message_handling.vader | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/test/lsp/test_other_initialize_message_handling.vader b/test/lsp/test_other_initialize_message_handling.vader index 6473e283..b6ef852a 100644 --- a/test/lsp/test_other_initialize_message_handling.vader +++ b/test/lsp/test_other_initialize_message_handling.vader @@ -131,7 +131,7 @@ Execute(Disabled capabilities should be recognised correctly): \ }, \ 'definitionProvider': v:false, \ 'experimental': {}, - \ 'documentHighlightProvider': v:true + \ 'documentHighlightProvider': v:true, \ }, \ }, \}) @@ -150,6 +150,57 @@ Execute(Disabled capabilities should be recognised correctly): \ b:conn.capabilities AssertEqual [[1, 'initialized', {}]], g:message_list +Execute(Capabilities should be enabled when send as Dictionaries): + call ale#lsp#HandleInitResponse(b:conn, { + \ 'jsonrpc': '2.0', + \ 'id': 1, + \ 'result': { + \ 'capabilities': { + \ 'renameProvider': {}, + \ 'executeCommandProvider': { + \ 'commands': [], + \ }, + \ 'hoverProvider': {}, + \ 'documentSymbolProvider': v:true, + \ 'documentRangeFormattingProvider': v:true, + \ 'codeLensProvider': { + \ 'resolveProvider': v:false + \ }, + \ 'completionProvider': { + \ 'triggerCharacters': ['.'], + \ 'resolveProvider': v:false + \ }, + \ 'referencesProvider': {}, + \ 'textDocumentSync': 2, + \ 'documentFormattingProvider': v:true, + \ 'codeActionProvider': v:true, + \ 'signatureHelpProvider': { + \ 'triggerCharacters': ['(', ','], + \ }, + \ 'definitionProvider': {}, + \ 'typeDefinitionProvider': {}, + \ 'experimental': {}, + \ 'documentHighlightProvider': v:true, + \ 'workspaceSymbolProvider': {} + \ }, + \ }, + \}) + + AssertEqual 1, b:conn.initialized + AssertEqual + \ { + \ 'completion_trigger_characters': ['.'], + \ 'completion': 1, + \ 'references': 1, + \ 'hover': 1, + \ 'definition': 1, + \ 'typeDefinition': 1, + \ 'symbol_search': 1, + \ 'rename': 1, + \ }, + \ b:conn.capabilities + AssertEqual [[1, 'initialized', {}]], g:message_list + Execute(Results that are not dictionaries should be handled correctly): call ale#lsp#HandleInitResponse(b:conn, { \ 'jsonrpc': '2.0', |