mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
#2132 - Implement deferred command handling for linters
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
Before:
|
||||
Save g:ale_run_synchronously
|
||||
Save g:ale_emulate_job_failure
|
||||
Save g:ale_buffer_info
|
||||
|
||||
let g:ale_run_synchronously = 1
|
||||
let g:ale_buffer_info = {}
|
||||
let b:ale_history = []
|
||||
|
||||
call ale#linter#Reset()
|
||||
call ale#assert#SetUpLinterTestCommands()
|
||||
@@ -22,8 +24,6 @@ After:
|
||||
|
||||
Given foobar (Some imaginary filetype):
|
||||
Execute(It should be possible to compute an executable to check based on the result of commands):
|
||||
let b:ale_history = []
|
||||
|
||||
AssertLinter 'foo', 'echo'
|
||||
|
||||
ALELint
|
||||
@@ -32,3 +32,15 @@ Execute(It should be possible to compute an executable to check based on the res
|
||||
AssertEqual
|
||||
\ [{'status': 0, 'job_id': 'executable', 'command': 'foo'}],
|
||||
\ filter(copy(b:ale_history), 'v:val.job_id is# ''executable''')
|
||||
|
||||
Execute(It handle the deferred command failing):
|
||||
let g:ale_emulate_job_failure = 1
|
||||
|
||||
AssertLinter 0, 'echo'
|
||||
|
||||
ALELint
|
||||
call ale#test#FlushJobs()
|
||||
|
||||
AssertEqual
|
||||
\ [],
|
||||
\ filter(copy(b:ale_history), 'v:val.job_id is# ''executable''')
|
||||
|
||||
Reference in New Issue
Block a user