diff options
Diffstat (limited to 'test/test_ale_init_au_groups.vader')
-rw-r--r-- | test/test_ale_init_au_groups.vader | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/test/test_ale_init_au_groups.vader b/test/test_ale_init_au_groups.vader index 109f84ae..3606402f 100644 --- a/test/test_ale_init_au_groups.vader +++ b/test/test_ale_init_au_groups.vader @@ -21,8 +21,14 @@ Before: let l:header = split(l:line)[1] let l:header = get(l:event_name_corrections, l:header, l:header) elseif !empty(l:header) - call add(l:matches, join(split(l:header . l:line))) - let l:header = '' + " There's an extra line for buffer events, and we should only look + " for the one matching the current buffer. + if l:line =~# '<buffer=' . bufnr('') . '>' + let l:header .= ' <buffer>' + else + call add(l:matches, join(split(l:header . l:line))) + let l:header = '' + endif endif endfor @@ -54,6 +60,11 @@ After: call ALEInitAuGroups() + " Clean up the quickfix group. + augroup ALEQuickfixCursorMovedEvent + autocmd! * <buffer> + augroup END + Execute (g:ale_lint_on_text_changed = 0 should bind no events): let g:ale_lint_on_text_changed = 0 @@ -211,3 +222,12 @@ Execute(Disabling completion should remove autocmd events correctly): AssertEqual [], CheckAutocmd('ALECompletionGroup') AssertEqual 0, g:ale_completion_enabled + +Execute(The cursor events should be set up for the quickfix list): + runtime! ftplugin/qf.vim + + AssertEqual + \ [ + \ 'CursorMoved <buffer> call ale#events#ParseLoclistWindowItemPosition()', + \ ], + \ CheckAutocmd('ALEQuickfixCursorMovedEvent') |