diff options
author | w0rp <devw0rp@gmail.com> | 2017-11-11 23:55:04 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-11-11 23:55:11 +0000 |
commit | ae08f80eade5c28efa54d8366368f2addaec6f35 (patch) | |
tree | 2502a837c59babf2acd77b58db5a2be326b25b7d /test/test_linter_retrieval.vader | |
parent | 3111c6c1ca22e759ea0a8dd4ac9f5d048cbcef24 (diff) | |
download | ale-ae08f80eade5c28efa54d8366368f2addaec6f35.zip |
#1108 Support using Lists and 'all' for b:ale_linters
Diffstat (limited to 'test/test_linter_retrieval.vader')
-rw-r--r-- | test/test_linter_retrieval.vader | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/test_linter_retrieval.vader b/test/test_linter_retrieval.vader index 1a1e2580..265738fb 100644 --- a/test/test_linter_retrieval.vader +++ b/test/test_linter_retrieval.vader @@ -42,6 +42,30 @@ Execute (You should be able to select linters with a buffer option): AssertEqual [g:testlinter1], ale#linter#Get('testft') +Execute (b:ale_linters should work when set to a List): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1', 'testlinter2']} + let b:ale_linters = ['testlinter1'] + + AssertEqual [g:testlinter1], ale#linter#Get('testft') + +Execute (b:ale_linters should disable all linters when set to an empty List): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1', 'testlinter2']} + let b:ale_linters = [] + + AssertEqual [], ale#linter#Get('testft') + +Execute (b:ale_linters should enable all available linters when set to 'all'): + call ale#linter#Define('testft', g:testlinter1) + call ale#linter#Define('testft', g:testlinter2) + let g:ale_linters = {'testft': ['testlinter1']} + let b:ale_linters = 'all' + + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft') + Execute (Buffer settings shouldn't completely replace global settings): call ale#linter#Define('testft', g:testlinter1) call ale#linter#Define('testft', g:testlinter2) |