diff options
Diffstat (limited to 'test/test_alejobstarted_autocmd.vader')
-rw-r--r-- | test/test_alejobstarted_autocmd.vader | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test_alejobstarted_autocmd.vader b/test/test_alejobstarted_autocmd.vader index 51a57881..388e5439 100644 --- a/test/test_alejobstarted_autocmd.vader +++ b/test/test_alejobstarted_autocmd.vader @@ -1,6 +1,6 @@ -Given testft (An empty file): - Before: + Save g:ale_buffer_info + let g:job_started_success = 0 let g:ale_run_synchronously = 1 @@ -10,6 +10,7 @@ Before: return [] endfunction + call ale#linter#PreventLoading('testft') call ale#linter#Define('testft', { \ 'name': 'testlinter', \ 'callback': 'TestCallback', @@ -18,8 +19,9 @@ Before: \}) After: + Restore + let g:ale_run_synchronously = 0 - let g:ale_buffer_info = {} try augroup! VaderTest @@ -31,12 +33,13 @@ After: delfunction TestCallback call ale#linter#Reset() +Given testft (An empty file): Execute(Run a lint cycle with an actual job to check for ALEJobStarted): augroup VaderTest autocmd! autocmd User ALEJobStarted let g:job_started_success = 1 augroup end - call ale#Lint() + ALELint AssertEqual g:job_started_success, 1 |