summaryrefslogtreecommitdiff
path: root/test/lsp/test_did_save_event.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/lsp/test_did_save_event.vader')
-rw-r--r--test/lsp/test_did_save_event.vader10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/lsp/test_did_save_event.vader b/test/lsp/test_did_save_event.vader
index f8ff8f70..1d6065ec 100644
--- a/test/lsp/test_did_save_event.vader
+++ b/test/lsp/test_did_save_event.vader
@@ -34,16 +34,19 @@ Before:
\ })
let g:ale_linters = {'foobar': ['dummy_linter']}
- function! ale#lsp_linter#StartLSP(buffer, linter) abort
+ function! ale#lsp_linter#StartLSP(buffer, linter, Callback) abort
let g:conn_id = ale#lsp#Register('executable', '/foo/bar', {})
call ale#lsp#MarkDocumentAsOpen(g:conn_id, a:buffer)
-
- return {
+ let l:details = {
\ 'buffer': a:buffer,
\ 'connection_id': g:conn_id,
\ 'project_root': '/foo/bar',
\ 'language_id': 'foobar',
\}
+
+ call a:Callback(a:linter, l:details)
+
+ return 1
endfunction
" Replace the Send function for LSP, so we can monitor calls to it.
@@ -61,6 +64,7 @@ After:
unlet! b:ale_enabled
unlet! b:ale_linters
unlet! g:message_list
+ unlet! b:ale_save_event_fired
delfunction LanguageCallback
delfunction ProjectRootCallback