diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-30 10:34:51 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-30 10:34:51 +0000 |
commit | a990188e276aad9410bc6fd1b627153fb279ffac (patch) | |
tree | a353be5794f9e8528b80764c1dcb3c7c52d6520b /test/test_ale_info.vader | |
parent | fd261264d7020699d76ed2f6eecd9800ef5f5b9f (diff) | |
download | ale-a990188e276aad9410bc6fd1b627153fb279ffac.zip |
Fix #1176 - Add an option for caching failing executable checks
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([ |