Tests added.
This commit is contained in:
parent
2ab46d4b8e
commit
c098a07d67
1 changed files with 28 additions and 0 deletions
|
@ -138,3 +138,31 @@ Execute(Non-empty then non-empty semantic errors should be handled):
|
|||
call ale#lsp_linter#HandleLSPResponse(1, CreateError('semanticDiag', 'x'))
|
||||
|
||||
Assert g:ale_handle_loclist_called
|
||||
|
||||
Execute(Subsequent empty lists should be ignored):
|
||||
let g:ale_buffer_info[bufnr('')].suggestion_loclist []
|
||||
|
||||
call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', ''))
|
||||
|
||||
Assert !g:ale_handle_loclist_called
|
||||
|
||||
Execute(Empty then non-empty semantic errors should be handled):
|
||||
let g:ale_buffer_info[bufnr('')].suggestion_loclist = []
|
||||
|
||||
call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', 'x'))
|
||||
|
||||
Assert g:ale_handle_loclist_called
|
||||
|
||||
Execute(Non-empty then empty semantic errors should be handled):
|
||||
let g:ale_buffer_info[bufnr('')].suggestion_loclist = CreateLoclist('x')
|
||||
|
||||
call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', ''))
|
||||
|
||||
Assert g:ale_handle_loclist_called
|
||||
|
||||
Execute(Non-empty then non-empty semantic errors should be handled):
|
||||
let g:ale_buffer_info[bufnr('')].suggestion_loclist = CreateLoclist('x')
|
||||
|
||||
call ale#lsp_linter#HandleLSPResponse(1, CreateError('suggestionDiag', 'x'))
|
||||
|
||||
Assert g:ale_handle_loclist_called
|
||||
|
|
Reference in a new issue