Simplify the tests for the ALELint autocmd command

This commit is contained in:
w0rp 2017-07-14 00:29:35 +01:00
parent 4c50aec79c
commit 5afbc9b701
1 changed files with 6 additions and 12 deletions

View File

@ -2,23 +2,17 @@ Before:
let g:success = 0
let g:ale_run_synchronously = 1
After:
let g:ale_run_synchronously = 0
let g:ale_buffer_info = {}
augroup! VaderTest
Execute (Run a lint cycle, and check that a variable is set in the autocmd):
augroup VaderTest
autocmd!
autocmd User ALELint let g:success = 1
augroup end
After:
let g:ale_run_synchronously = 0
augroup! VaderTest
let g:ale_buffer_info = {}
Given vim (Some vimscript):
set nocompatible
Execute (Lint it):
call ale#Lint()
call ale#engine#WaitForJobs(2000)
Then (Autocommands should have run):
AssertEqual g:success, 1