diff options
author | w0rp <w0rp@users.noreply.github.com> | 2018-09-18 17:46:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-18 17:46:45 +0100 |
commit | 993f02ad80bf76c49557b181626bc48a7d4769f1 (patch) | |
tree | a211e517297d74fdb64ff52fe92bde1714675010 /test | |
parent | 213a901ccd237903c7decb00696418e1abc930c9 (diff) | |
parent | f09e6d638fc012b3bdccccdc3496e135fbd7df87 (diff) | |
download | ale-993f02ad80bf76c49557b181626bc48a7d4769f1.zip |
Merge pull request #1928 from felipesere/master
To avoid blocking build tools, suspend ALE when suspending vim
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 |