diff options
author | Felipe Sere <felipesere@gmail.com> | 2018-09-17 21:26:25 +0100 |
---|---|---|
committer | Felipe Sere <felipesere@gmail.com> | 2018-09-17 21:26:25 +0100 |
commit | f09e6d638fc012b3bdccccdc3496e135fbd7df87 (patch) | |
tree | b1f503ba6c04cee6eb97f6564392df0f2d9d53d4 /test | |
parent | cbf0568061b5d30af3478ca5db3bb73bd97c9981 (diff) | |
download | ale-f09e6d638fc012b3bdccccdc3496e135fbd7df87.zip |
Test that we CleanupEveryBuffer when vim supports it
Diffstat (limited to 'test')
-rw-r--r-- | test/test_autocmd_commands.vader | 17 |
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 |