summaryrefslogtreecommitdiff
path: root/test/test_linter_retrieval.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-12 00:11:50 +0000
committerw0rp <devw0rp@gmail.com>2017-11-12 00:11:50 +0000
commit27e2f53ac9892e8285d629228d5c25bdcdf84803 (patch)
treeb0490f0bbccfd247c459d9ab0fde73aef4ac3a8c /test/test_linter_retrieval.vader
parentae08f80eade5c28efa54d8366368f2addaec6f35 (diff)
downloadale-27e2f53ac9892e8285d629228d5c25bdcdf84803.zip
#1108 Support setting b:ale_linter_aliases to a List
Diffstat (limited to 'test/test_linter_retrieval.vader')
-rw-r--r--test/test_linter_retrieval.vader15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_linter_retrieval.vader b/test/test_linter_retrieval.vader
index 265738fb..5d5b582d 100644
--- a/test/test_linter_retrieval.vader
+++ b/test/test_linter_retrieval.vader
@@ -126,6 +126,21 @@ Execute (The local alias option shouldn't completely replace the global one):
" global Dictionary.
let b:ale_linter_aliases = {'testft3': ['testft1']}
+Execute (Lists should be accepted for local aliases):
+ call ale#linter#Define('testft1', g:testlinter1)
+ call ale#linter#Define('testft2', g:testlinter2)
+ let g:ale_linter_aliases = {'testft1': ['testft1', 'testft2']}
+ " We should load the testft2 linters for this buffer, with no duplicates.
+ let b:ale_linter_aliases = ['testft2']
+
+ AssertEqual [g:testlinter2], ale#linter#Get('anything.else')
+
+Execute (Buffer-local overrides for aliases should be used):
+ call ale#linter#Define('testft1', g:testlinter1)
+ call ale#linter#Define('testft2', g:testlinter2)
+ let g:ale_linter_aliases = {'testft1': ['testft2']}
+ let b:ale_linter_aliases = {'testft1': ['testft1', 'testft2']}
+
AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1')
Execute (Linters should be loaded from disk appropriately):