diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-26 12:24:18 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-26 12:24:18 +0000 |
commit | b1a6abdda6f23ba314799f21c04d30e3411cebc7 (patch) | |
tree | 88a989835523ada49b909586031953f37b2f0af1 /test/lsp/test_lsp_client_messages.vader | |
parent | 2e50aadd56966c42cf82befaa7e4a3bac284581a (diff) | |
download | ale-b1a6abdda6f23ba314799f21c04d30e3411cebc7.zip |
#1162 Add unfinished experimental code for supporting LSP completion, clean up the tests, and make the completion cancelling better
Diffstat (limited to 'test/lsp/test_lsp_client_messages.vader')
-rw-r--r-- | test/lsp/test_lsp_client_messages.vader | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/lsp/test_lsp_client_messages.vader b/test/lsp/test_lsp_client_messages.vader index c6d82b60..bd0cd102 100644 --- a/test/lsp/test_lsp_client_messages.vader +++ b/test/lsp/test_lsp_client_messages.vader @@ -101,6 +101,35 @@ Execute(ale#lsp#message#DidClose() should return correct messages): \ ], \ ale#lsp#message#DidClose(bufnr('')) +Execute(ale#lsp#message#Completion() should return correct messages): + AssertEqual + \ [ + \ 0, + \ 'textDocument/completion', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ } + \ ], + \ ale#lsp#message#Completion(bufnr(''), 12, 34, '') + +Execute(ale#lsp#message#Completion() should return correct messages with a trigger charaacter): + AssertEqual + \ [ + \ 0, + \ 'textDocument/completion', + \ { + \ 'textDocument': { + \ 'uri': ale#path#ToURI(g:dir . '/foo/bar.ts'), + \ }, + \ 'position': {'line': 11, 'character': 33}, + \ 'context': {'triggerKind': 2, 'triggerCharacter': '.'}, + \ } + \ ], + \ ale#lsp#message#Completion(bufnr(''), 12, 34, '.') + Execute(ale#lsp#tsserver_message#Open() should return correct messages): AssertEqual \ [ |