mirror of https://github.com/dense-analysis/ale
Fix tests for LSP suggestions
This commit is contained in:
parent
99eb68e6ca
commit
8beb67b4d1
|
@ -1,8 +1,10 @@
|
||||||
Before:
|
Before:
|
||||||
Save g:ale_buffer_info
|
Save g:ale_buffer_info
|
||||||
Save g:ale_disable_lsp
|
Save g:ale_disable_lsp
|
||||||
|
Save g:ale_lsp_suggestions
|
||||||
|
|
||||||
let g:ale_disable_lsp = 0
|
let g:ale_disable_lsp = 0
|
||||||
|
let g:ale_lsp_suggestions = 1
|
||||||
unlet! b:ale_disable_lsp
|
unlet! b:ale_disable_lsp
|
||||||
|
|
||||||
function! CreateError(type, message) abort
|
function! CreateError(type, message) abort
|
||||||
|
@ -146,6 +148,14 @@ Execute(Subsequent empty lists should be ignored - suggestion):
|
||||||
|
|
||||||
Assert !g:ale_handle_loclist_called
|
Assert !g:ale_handle_loclist_called
|
||||||
|
|
||||||
|
Execute(You should be able to disable suggestions):
|
||||||
|
let g:ale_lsp_suggestions = 0
|
||||||
|
let g:ale_buffer_info[bufnr('')].suggestion_loclist = []
|
||||||
|
|
||||||
|
call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', 'x'))
|
||||||
|
|
||||||
|
Assert !g:ale_handle_loclist_called
|
||||||
|
|
||||||
Execute(Empty then non-empty suggestion messages should be handled):
|
Execute(Empty then non-empty suggestion messages should be handled):
|
||||||
let g:ale_buffer_info[bufnr('')].suggestion_loclist = []
|
let g:ale_buffer_info[bufnr('')].suggestion_loclist = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue