summaryrefslogtreecommitdiff
path: root/test/test_redundant_tsserver_rendering_avoided.vader
diff options
context:
space:
mode:
authorDalius Dobravolskas <daliusd@wix.com>2020-09-23 16:24:45 +0300
committerDalius Dobravolskas <dalius.dobravolskas@gmail.com>2020-11-21 15:49:41 +0200
commitc098a07d67090442164b4bca82ebbedae992bf50 (patch)
tree85cab49804261d2821c8116c14b5de5d0a8d5ee7 /test/test_redundant_tsserver_rendering_avoided.vader
parent2ab46d4b8e9611e25cd880ee1f4b4a71b59f0446 (diff)
downloadale-c098a07d67090442164b4bca82ebbedae992bf50.zip
Tests added.
Diffstat (limited to 'test/test_redundant_tsserver_rendering_avoided.vader')
-rw-r--r--test/test_redundant_tsserver_rendering_avoided.vader28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/test_redundant_tsserver_rendering_avoided.vader b/test/test_redundant_tsserver_rendering_avoided.vader
index 6125ebc2..12897da4 100644
--- a/test/test_redundant_tsserver_rendering_avoided.vader
+++ b/test/test_redundant_tsserver_rendering_avoided.vader
@@ -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