diff options
author | w0rp <devw0rp@gmail.com> | 2017-06-06 20:37:04 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-06-06 20:40:07 +0100 |
commit | eeea72e16740bb1dfa5bd554a927e6bbee76a9b5 (patch) | |
tree | 69cf426eb9fe7a16f4f75455f7ac398c5b716d75 /test/handler | |
parent | 7db805b0cd1367ebf866e0c149fd819e425f6e0d (diff) | |
download | ale-eeea72e16740bb1dfa5bd554a927e6bbee76a9b5.zip |
Fix #625 Ignore Perl errors from other files
Diffstat (limited to 'test/handler')
-rw-r--r-- | test/handler/test_perl_handler.vader | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/handler/test_perl_handler.vader b/test/handler/test_perl_handler.vader new file mode 100644 index 00000000..2961b266 --- /dev/null +++ b/test/handler/test_perl_handler.vader @@ -0,0 +1,25 @@ +Before: + " Switch to the test rails directory. + let b:path = getcwd() + silent! cd /testplugin/test/handler + + runtime ale_linters/perl/perl.vim + +After: + silent! 'cd ' . fnameescape(b:path) + unlet! b:path + + call ale#linter#Reset() + +Execute(The Perl linter should ignore errors from other files): + silent! noautocmd file bar.pl + + AssertEqual + \ [ + \ {'lnum': '2', 'type': 'E', 'text': 'Compilation failed in require'}, + \ ], + \ ale_linters#perl#perl#Handle(bufnr(''), [ + \ 'syntax error at ' . b:path . '/foo.pm line 4, near "aklsdfjmy "', + \ 'Compilation failed in require at ' . b:path . '/bar.pl line 2.', + \ 'BEGIN failed--compilation aborted at ' . b:path . '/bar.pl line 2.', + \ ]) |