Fix #1619 - Rewrite lint on enter events so they behave better

This commit is contained in:
w0rp
2018-07-17 00:18:20 +01:00
parent 37df1f8ceb
commit a01fab2ee6
12 changed files with 156 additions and 116 deletions
+7 -4
View File
@@ -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