#1095 Apply all patterns for g:ale_pattern_options, instead of just the first match
This commit is contained in:
parent
6c014a25e8
commit
8c1d6eda81
5 changed files with 111 additions and 43 deletions
|
@ -108,17 +108,28 @@ Execute (g:ale_lint_on_insert_leave = 0 should bind no events):
|
|||
|
||||
AssertEqual [], CheckAutocmd('ALERunOnInsertLeave')
|
||||
|
||||
Execute (g:ale_pattern_options_enabled = 0 should bind no events):
|
||||
let g:ale_pattern_options_enabled = 0
|
||||
|
||||
AssertEqual [], CheckAutocmd('ALEPatternOptionsGroup')
|
||||
|
||||
Execute (g:ale_pattern_options_enabled = 1 should bind BufReadPost and BufEnter):
|
||||
let g:ale_pattern_options_enabled = 1
|
||||
|
||||
AssertEqual [
|
||||
\ 'BufEnter * call ale#pattern_options#SetOptions()',
|
||||
\ 'BufReadPost * call ale#pattern_options#SetOptions()',
|
||||
\ 'BufEnter * call ale#pattern_options#SetOptions(str2nr(expand(''<abuf>'')))',
|
||||
\ 'BufReadPost * call ale#pattern_options#SetOptions(str2nr(expand(''<abuf>'')))',
|
||||
\], CheckAutocmd('ALEPatternOptionsGroup')
|
||||
|
||||
Execute (g:ale_pattern_options_enabled = 0 should still bind events):
|
||||
let g:ale_pattern_options_enabled = 0
|
||||
|
||||
AssertEqual [
|
||||
\ 'BufEnter * call ale#pattern_options#SetOptions(str2nr(expand(''<abuf>'')))',
|
||||
\ 'BufReadPost * call ale#pattern_options#SetOptions(str2nr(expand(''<abuf>'')))',
|
||||
\], CheckAutocmd('ALEPatternOptionsGroup')
|
||||
|
||||
Execute (g:ale_enabled = 0 should still bind pattern events):
|
||||
let g:ale_enabled = 0
|
||||
|
||||
AssertEqual [
|
||||
\ 'BufEnter * call ale#pattern_options#SetOptions(str2nr(expand(''<abuf>'')))',
|
||||
\ 'BufReadPost * call ale#pattern_options#SetOptions(str2nr(expand(''<abuf>'')))',
|
||||
\], CheckAutocmd('ALEPatternOptionsGroup')
|
||||
|
||||
Execute (g:ale_lint_on_enter = 0 should bind only the BufEnter event):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue