mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-12 21:21:50 +08:00
Set up most of the autocmd events in one group
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user