summaryrefslogtreecommitdiff
path: root/test/test_ale_info.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_ale_info.vader')
-rw-r--r--test/test_ale_info.vader61
1 files changed, 61 insertions, 0 deletions
diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader
index c1ae5a7d..75078607 100644
--- a/test/test_ale_info.vader
+++ b/test/test_ale_info.vader
@@ -1,30 +1,50 @@
Before:
Save g:ale_buffer_info
Save g:ale_cache_executable_check_failures
+ Save g:ale_completion_delay
Save g:ale_completion_enabled
+ Save g:ale_completion_max_suggestions
Save g:ale_fixers
Save g:ale_history_log_output
Save g:ale_lint_on_insert_leave
Save g:ale_lint_on_text_changed
Save g:ale_linters
+ Save g:ale_lsp_error_messages
Save g:ale_maximum_file_size
Save g:ale_pattern_options
Save g:ale_pattern_options_enabled
Save g:ale_set_balloons
+ Save g:ale_sign_error
+ Save g:ale_sign_info
+ Save g:ale_sign_style_error
+ Save g:ale_sign_style_warning
+ Save g:ale_sign_warning
+ Save g:ale_statusline_format
+ Save g:ale_type_map
Save g:ale_warn_about_trailing_whitespace
unlet! b:ale_history
let g:ale_buffer_info = {}
let g:ale_cache_executable_check_failures = 0
+ let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
+ let g:ale_completion_max_suggestions = 50
let g:ale_history_log_output = 1
let g:ale_lint_on_insert_leave = 0
let g:ale_lint_on_text_changed = 'always'
+ let g:ale_lsp_error_messages = {}
let g:ale_maximum_file_size = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
let g:ale_set_balloons = 0
+ let g:ale_sign_error = '>>'
+ let g:ale_sign_info = '--'
+ let g:ale_sign_style_error = '>>'
+ let g:ale_sign_style_warning = '--'
+ let g:ale_sign_warning = '--'
+ let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
+ let g:ale_type_map = {}
let g:ale_warn_about_trailing_whitespace = 1
let g:testlinter1 = {'name': 'testlinter1', 'executable': 'testlinter1', 'command': 'testlinter1', 'callback': 'testCB1', 'output_stream': 'stdout'}
@@ -469,3 +489,44 @@ Execute (The option for caching failing executable checks should work):
\ '(executable check - success) ' . (has('win32') ? 'cmd' : 'echo'),
\ '(executable check - failure) TheresNoWayThisIsExecutable',
\])
+
+Given testft (Empty buffer):
+Execute (LSP errors for a linter should be outputted):
+ let g:ale_lsp_error_messages = {'testlinter1': ['foo', 'bar']}
+ call ale#linter#Define('testft', g:testlinter1)
+
+ call CheckInfo(
+ \ [
+ \ ' Current Filetype: testft',
+ \ 'Available Linters: [''testlinter1'']',
+ \ ' Enabled Linters: [''testlinter1'']',
+ \ ' Linter Variables:',
+ \ '',
+ \ ]
+ \ + g:globals_lines
+ \ + [
+ \ ' LSP Error Messages:',
+ \ '',
+ \ '(Errors for testlinter1)',
+ \ 'foo',
+ \ 'bar',
+ \ ]
+ \ + g:command_header
+ \)
+
+Given testft (Empty buffer):
+Execute (LSP errors for other linters shouldn't appear):
+ let g:ale_lsp_error_messages = {'testlinter2': ['foo']}
+ call ale#linter#Define('testft', g:testlinter1)
+
+ call CheckInfo(
+ \ [
+ \ ' Current Filetype: testft',
+ \ 'Available Linters: [''testlinter1'']',
+ \ ' Enabled Linters: [''testlinter1'']',
+ \ ' Linter Variables:',
+ \ '',
+ \ ]
+ \ + g:globals_lines
+ \ + g:command_header
+ \)