26 lines
711 B
Plaintext
26 lines
711 B
Plaintext
|
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.',
|
||
|
\ ])
|