Refactor jobs into a Vim version agnostic API which can be used for other purposes

This commit is contained in:
w0rp
2017-05-12 21:16:15 +01:00
parent 2bafdb7e5a
commit 5a947933d7
8 changed files with 280 additions and 254 deletions

View File

@@ -1,4 +1,7 @@
Before:
Save &shell, g:ale_run_synchronously
let g:ale_run_synchronously = 1
set shell=/bin/sh
let g:linter_output = []
let g:first_echo_called = 0
let g:second_echo_called = 0
@@ -39,6 +42,7 @@ Before:
\})
After:
Restore
unlet! g:first_echo_called
unlet! g:second_echo_called
unlet! g:final_callback_called
@@ -55,9 +59,6 @@ Given foobar (Some imaginary filetype):
Execute(Check the results of running the chain):
AssertEqual 'foobar', &filetype
call ale#Lint()
" Sleep a little. This allows the commands to complete a little better.
sleep 50m
call ale#engine#WaitForJobs(2000)
Assert g:first_echo_called, 'The first chain item was not called'
Assert g:second_echo_called, 'The second chain item was not called'