summaryrefslogtreecommitdiff
path: root/test/test_autocmd_commands.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_autocmd_commands.vader')
-rw-r--r--test/test_autocmd_commands.vader17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/test_autocmd_commands.vader b/test/test_autocmd_commands.vader
index 8d5048f0..4bb894ba 100644
--- a/test/test_autocmd_commands.vader
+++ b/test/test_autocmd_commands.vader
@@ -175,10 +175,19 @@ Execute (g:ale_lint_on_filetype_changed = 1 should bind the FileType event):
\ filter(CheckAutocmd('ALEEvents'), 'v:val =~ ''\v^FileType''')
Execute (ALECleanupGroup should include the right commands):
- AssertEqual [
- \ 'BufDelete * if exists(''*ale#engine#Cleanup'') | call ale#engine#Cleanup(str2nr(expand(''<abuf>''))) | endif',
- \ 'QuitPre * call ale#events#QuitEvent(str2nr(expand(''<abuf>'')))',
- \], CheckAutocmd('ALECleanupGroup')
+ if exists('##VimSuspend')
+ AssertEqual [
+ \ 'BufDelete * if exists(''*ale#engine#Cleanup'') | call ale#engine#Cleanup(str2nr(expand(''<abuf>''))) | endif',
+ \ 'QuitPre * call ale#events#QuitEvent(str2nr(expand(''<abuf>'')))',
+ \ 'VimSuspend * if exists(''*ale#engine#CleanupEveryBuffer'') | call ale#engine#CleanupEveryBuffer() | endif',
+ \], CheckAutocmd('ALECleanupGroup')
+ else
+ AssertEqual [
+ \ 'BufDelete * if exists(''*ale#engine#Cleanup'') | call ale#engine#Cleanup(str2nr(expand(''<abuf>''))) | endif',
+ \ 'QuitPre * call ale#events#QuitEvent(str2nr(expand(''<abuf>'')))',
+ \], CheckAutocmd('ALECleanupGroup')
+ endif
+
Execute(Enabling completion should set up autocmd events correctly):
let g:ale_completion_enabled = 0