summaryrefslogtreecommitdiff
path: root/test/test_alejobstarted_autocmd.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-17 00:18:20 +0100
committerw0rp <devw0rp@gmail.com>2018-07-17 00:18:34 +0100
commita01fab2ee6dd827d555792f69fc30443a64dac5f (patch)
tree4aad6c04c416e981fe9b3246e1e455baa26fee96 /test/test_alejobstarted_autocmd.vader
parent37df1f8ceb97f19f4576c00c8146aad3a5a8a648 (diff)
downloadale-a01fab2ee6dd827d555792f69fc30443a64dac5f.zip
Fix #1619 - Rewrite lint on enter events so they behave better
Diffstat (limited to 'test/test_alejobstarted_autocmd.vader')
-rw-r--r--test/test_alejobstarted_autocmd.vader11
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