diff options
Diffstat (limited to 'test/test_linter_retrieval.vader')
-rw-r--r-- | test/test_linter_retrieval.vader | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_linter_retrieval.vader b/test/test_linter_retrieval.vader index e0d6c284..3f405a52 100644 --- a/test/test_linter_retrieval.vader +++ b/test/test_linter_retrieval.vader @@ -39,5 +39,19 @@ Execute (Define multiple linters for different filetypes): Then (Linters for dot-seperated filetypes should be properly handled): AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1.testft2') +Execute (Define multiple aliases for a filetype): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let ale_linter_aliases = {'testft3': ['testft1', 'testft2']} +Then (Linters should be transparently aliased): + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft3') + +Execute (Alias a filetype to itself plus another one): + call ale#linter#Define('testft1', g:testlinter1) + call ale#linter#Define('testft2', g:testlinter2) + let ale_linter_aliases = {'testft1': ['testft1', 'testft2']} +Then (The original linters should still be there): + AssertEqual [g:testlinter1, g:testlinter2], ale#linter#Get('testft1') + Execute (Try to load a linter from disk): AssertEqual [{'name': 'testlinter', 'output_stream': 'stdout', 'executable': 'testlinter', 'command': 'testlinter', 'callback': 'testCB', 'read_buffer': 1, 'lint_file': 0}], ale#linter#Get('testft') |