diff options
author | w0rp <devw0rp@gmail.com> | 2021-02-06 18:55:21 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2021-02-06 18:55:21 +0000 |
commit | 8beb67b4d105abae69b6248655c1d2d1ebfb067d (patch) | |
tree | da12a87d0eef15c25d4c6e2229d81ede0cef25ad /test | |
parent | 99eb68e6ca98a2eaabeb1e1eea00b3f59431b9dc (diff) | |
download | ale-8beb67b4d105abae69b6248655c1d2d1ebfb067d.zip |
Fix tests for LSP suggestions
Diffstat (limited to 'test')
-rw-r--r-- | test/test_redundant_tsserver_rendering_avoided.vader | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_redundant_tsserver_rendering_avoided.vader b/test/test_redundant_tsserver_rendering_avoided.vader index bde5d152..05660d4e 100644 --- a/test/test_redundant_tsserver_rendering_avoided.vader +++ b/test/test_redundant_tsserver_rendering_avoided.vader @@ -1,8 +1,10 @@ Before: Save g:ale_buffer_info Save g:ale_disable_lsp + Save g:ale_lsp_suggestions let g:ale_disable_lsp = 0 + let g:ale_lsp_suggestions = 1 unlet! b:ale_disable_lsp function! CreateError(type, message) abort @@ -146,6 +148,14 @@ Execute(Subsequent empty lists should be ignored - suggestion): 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): let g:ale_buffer_info[bufnr('')].suggestion_loclist = [] |