mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-19 06:49:46 +08:00
Fix #1619 - Rewrite lint on enter events so they behave better
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user