summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-30 10:34:51 +0000
committerw0rp <devw0rp@gmail.com>2017-11-30 10:34:51 +0000
commita990188e276aad9410bc6fd1b627153fb279ffac (patch)
treea353be5794f9e8528b80764c1dcb3c7c52d6520b /test
parentfd261264d7020699d76ed2f6eecd9800ef5f5b9f (diff)
downloadale-a990188e276aad9410bc6fd1b627153fb279ffac.zip
Fix #1176 - Add an option for caching failing executable checks
Diffstat (limited to 'test')
-rw-r--r--test/test_ale_info.vader29
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([