diff options
Diffstat (limited to 'test/test_checkingbuffer_autocmd.vader')
-rw-r--r-- | test/test_checkingbuffer_autocmd.vader | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/test_checkingbuffer_autocmd.vader b/test/test_checkingbuffer_autocmd.vader index 1cbfa342..9e3a8188 100644 --- a/test/test_checkingbuffer_autocmd.vader +++ b/test/test_checkingbuffer_autocmd.vader @@ -1,9 +1,7 @@ -Given testft (An empty file): - Before: Save g:ale_run_synchronously Save g:ale_buffer_info - + let g:ale_run_synchronously = 1 let g:ale_buffer_info = {} @@ -15,6 +13,7 @@ Before: return [] endfunction + call ale#linter#PreventLoading('testft') call ale#linter#Define('testft', { \ 'name': 'testlinter', \ 'callback': 'TestCallback', @@ -26,32 +25,33 @@ After: Restore unlet! g:checking_buffer - + delfunction TestCallback call ale#linter#Reset() - + augroup VaderTest autocmd! augroup end augroup! VaderTest +Given testft (An empty file): Execute(ALELintPre should not return success on ale#engine#IsCheckingBuffer): augroup VaderTest autocmd! - autocmd User ALELintPre let g:checking_buffer = ale#engine#IsCheckingBuffer(bufnr('')) ? 1 : 0 + autocmd User ALELintPre let g:checking_buffer = ale#engine#IsCheckingBuffer(bufnr('')) ? 1 : 0 augroup end - call ale#Lint() + ALELint AssertEqual g:checking_buffer, 0 Execute(ALEJobStarted should return success on ale#engine#IsCheckingBuffer): augroup VaderTest autocmd! - autocmd User ALEJobStarted let g:checking_buffer = ale#engine#IsCheckingBuffer(bufnr('')) ? 1 : 0 + autocmd User ALEJobStarted let g:checking_buffer = ale#engine#IsCheckingBuffer(bufnr('')) ? 1 : 0 augroup end - call ale#Lint() + ALELint AssertEqual g:checking_buffer, 1 |