summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lsp/test_other_initialize_message_handling.vader53
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',