mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
#1095 Cache the sorting of patterns for g:ale_pattern_options
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user