Set up most of the autocmd events in one group

This commit is contained in:
w0rp
2018-06-20 13:35:57 +01:00
parent 9674132933
commit 0e1528ec34
3 changed files with 123 additions and 171 deletions

View File

@@ -32,12 +32,8 @@ Before:
\}]
let g:expected_groups = [
\ 'ALECleanupGroup',
\ 'ALECursorGroup',
\ 'ALEEvents',
\ 'ALEHighlightBufferGroup',
\ 'ALERunOnEnterGroup',
\ 'ALERunOnFiletypeChangeGroup',
\ 'ALERunOnSaveGroup',
\ 'ALERunOnTextChangedGroup',
\]
function! ToggleTestCallback(buffer, output)
@@ -60,7 +56,7 @@ Before:
let l:results = []
for l:line in split(l:output, "\n")
let l:match = matchlist(l:line, '^ALE[a-zA-Z]\+Group')
let l:match = matchlist(l:line, '^ALE[a-zA-Z]\+')
" We don't care about some groups here.
if !empty(l:match)
@@ -139,13 +135,7 @@ Execute(ALEToggle should reset everything and then run again):
AssertEqual [], getloclist(0), 'The loclist was not cleared'
AssertEqual [0, []], ale#sign#FindCurrentSigns(bufnr('%')), 'The signs were not cleared'
AssertEqual [], getmatches(), 'The highlights were not cleared'
AssertEqual
\ [
\ 'ALECleanupGroup',
\ 'ALEHighlightBufferGroup',
\ 'ALERunOnSaveGroup',
\ ],
\ ParseAuGroups()
AssertEqual g:expected_groups, ParseAuGroups()
" Toggle ALE on, everything should be set up and run again.
ALEToggle