diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-11 14:26:54 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-11 14:26:54 +0000 |
commit | bac02c9d81356f1cc1f38b598c30c9b46fe21b7b (patch) | |
tree | 2a71e167d98eaddfc5efe5db4512fce0ab22184f /test/test_pattern_options.vader | |
parent | 8c1d6eda81d408de767916c00d20139ddf6fc9c6 (diff) | |
download | ale-bac02c9d81356f1cc1f38b598c30c9b46fe21b7b.zip |
#1095 Cache the sorting of patterns for g:ale_pattern_options
Diffstat (limited to 'test/test_pattern_options.vader')
-rw-r--r-- | test/test_pattern_options.vader | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_pattern_options.vader b/test/test_pattern_options.vader index 0ad4415f..0e26eaaa 100644 --- a/test/test_pattern_options.vader +++ b/test/test_pattern_options.vader @@ -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 |