diff options
Diffstat (limited to 'test/test_ale_info.vader')
-rw-r--r-- | test/test_ale_info.vader | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/test_ale_info.vader b/test/test_ale_info.vader index 30237a3c..2ca18341 100644 --- a/test/test_ale_info.vader +++ b/test/test_ale_info.vader @@ -2,9 +2,13 @@ Before: Save g:ale_warn_about_trailing_whitespace Save g:ale_linters Save g:ale_fixers + Save g:ale_lint_on_text_changed + Save g:ale_cache_executable_check_failures unlet! b:ale_history + let g:ale_lint_on_text_changed = 'always' + let g:ale_cache_executable_check_failures = 0 let g:ale_warn_about_trailing_whitespace = 1 let g:testlinter1 = {'name': 'testlinter1', 'executable': 'testlinter1', 'command': 'testlinter1', 'callback': 'testCB1', 'output_stream': 'stdout'} @@ -355,6 +359,31 @@ Execute (ALEInfo command history should print command output if logging is on): Execute (ALEInfo should include executable checks in the history): call ale#linter#Define('testft', g:testlinter1) call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') + call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') + + call CheckInfo([ + \ ' Current Filetype: testft.testft2', + \ 'Available Linters: [''testlinter1'']', + \ ' Enabled Linters: [''testlinter1'']', + \ ' Linter Variables:', + \ '', + \] + g:globals_lines + g:command_header + [ + \ '', + \ '(executable check - success) ' . (has('win32') ? 'cmd' : 'echo'), + \ '(executable check - failure) TheresNoWayThisIsExecutable', + \ '(executable check - failure) TheresNoWayThisIsExecutable', + \]) + +Execute (The option for caching failing executable checks should work): + let g:ale_cache_executable_check_failures = 1 + + call ale#linter#Define('testft', g:testlinter1) + + call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), has('win32') ? 'cmd' : 'echo') + call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') call ale#engine#IsExecutable(bufnr(''), 'TheresNoWayThisIsExecutable') call CheckInfo([ |