summaryrefslogtreecommitdiff
path: root/test/lsp
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-26 12:24:18 +0000
committerw0rp <devw0rp@gmail.com>2017-11-26 12:24:18 +0000
commitb1a6abdda6f23ba314799f21c04d30e3411cebc7 (patch)
tree88a989835523ada49b909586031953f37b2f0af1 /test/lsp
parent2e50aadd56966c42cf82befaa7e4a3bac284581a (diff)
downloadale-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')
-rw-r--r--test/lsp/test_lsp_client_messages.vader29
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
\ [