#1095 Cache the sorting of patterns for g:ale_pattern_options
This commit is contained in:
parent
8c1d6eda81
commit
bac02c9d81
2 changed files with 31 additions and 5 deletions
|
@ -74,3 +74,19 @@ Execute(Patterns should not be applied when the setting is disabled):
|
|||
call ale#pattern_options#SetOptions(bufnr(''))
|
||||
|
||||
AssertEqual 0, b:some_option
|
||||
|
||||
" This test is important for making sure we update the sorted items.
|
||||
Execute(Patterns should be applied after the Dictionary changes):
|
||||
call ale#test#SetFilename('foobar.js')
|
||||
|
||||
let g:ale_pattern_options = {}
|
||||
|
||||
call ale#pattern_options#SetOptions(bufnr(''))
|
||||
|
||||
AssertEqual 0, b:some_option
|
||||
|
||||
let g:ale_pattern_options['foo'] = {'some_option': 666}
|
||||
|
||||
call ale#pattern_options#SetOptions(bufnr(''))
|
||||
|
||||
AssertEqual 666, b:some_option
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue