summaryrefslogtreecommitdiff
path: root/test/handler
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2018-12-20 16:22:10 +0000
committerGitHub <noreply@github.com>2018-12-20 16:22:10 +0000
commit73ca1e71918a0b50b7bbcbed91857c3618ad93cc (patch)
tree6faecbbfade7d5f54a9e967636cb9fce95667d56 /test/handler
parent5345a5dd81513f68f7b45258a5ca1e0010cb1d35 (diff)
parentc19f2aa3027b86b02eebefbdd962b48754a111c5 (diff)
downloadale-73ca1e71918a0b50b7bbcbed91857c3618ad93cc.zip
Merge pull request #2150 from mvgrimes/perl-linter-data-fix
Update the perl-linter's l:pattern to catch missing errors
Diffstat (limited to 'test/handler')
-rw-r--r--test/handler/test_perl_handler.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/handler/test_perl_handler.vader b/test/handler/test_perl_handler.vader
index e769550c..060b1ffe 100644
--- a/test/handler/test_perl_handler.vader
+++ b/test/handler/test_perl_handler.vader
@@ -91,3 +91,19 @@ Execute(The Perl linter reports errors even when mixed with warnings):
\ 'syntax error at - line 8, at EOF',
\ 'Execution of t.pl aborted due to compilation errors.',
\ ])
+
+Execute(The Perl linter reports errors even when an additional file location is included):
+ AssertEqual
+ \ [
+ \ {'lnum': '5', 'type': 'E', 'text': '"my" variable $foo masks earlier declaration in same scope'},
+ \ {'lnum': '6', 'type': 'E', 'text': '"my" variable $foo masks earlier declaration in same scope'},
+ \ {'lnum': '11', 'type': 'E', 'text': 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?)'},
+ \ {'lnum': '12', 'type': 'E', 'text': 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?)'},
+ \ ],
+ \ ale_linters#perl#perl#Handle(bufnr(''), [
+ \ '"my" variable $foo masks earlier declaration in same scope at - line 5.',
+ \ '"my" variable $foo masks earlier declaration in same scope at - line 6, at <DATA> line 1.',
+ \ 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?) at - line 11.',
+ \ 'Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?) at - line 12, <DATA> line 1.',
+ \ 'Execution of t.pl aborted due to compilation errors.',
+ \ ])