diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-04-24 15:24:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-04-24 15:24:32 +0000 |
commit | bfe69b02ea6502de4e39e4a54183489cef89c093 (patch) | |
tree | 12282cd81f4760c8504dc271eff34dfa70728fdb /perl_checker.src | |
parent | 7634d075084743db106fe759f6d10f59250503b3 (diff) | |
download | perl_checker-bfe69b02ea6502de4e39e4a54183489cef89c093.tar perl_checker-bfe69b02ea6502de4e39e4a54183489cef89c093.tar.gz perl_checker-bfe69b02ea6502de4e39e4a54183489cef89c093.tar.bz2 perl_checker-bfe69b02ea6502de4e39e4a54183489cef89c093.tar.xz perl_checker-bfe69b02ea6502de4e39e4a54183489cef89c093.zip |
ensure warnings in MDK::Common::* files don't bother the test
(since MDK::Common files can be taken from the /usr instead of
perl-MDK-Common repository (since it has been splitted))
Diffstat (limited to 'perl_checker.src')
-rwxr-xr-x | perl_checker.src/test/test_it | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/perl_checker.src/test/test_it b/perl_checker.src/test/test_it index e88607e..a89c2c5 100755 --- a/perl_checker.src/test/test_it +++ b/perl_checker.src/test/test_it @@ -83,8 +83,19 @@ foreach my $test (@tests) { @l = ($header, @l); } output('.pl', @l); - my @log = grep { !/^File .*, line / } `../perl_checker .pl`; - die "@log in .pl ($file):\n" . join('', @{$test->{lines}}) if any { /^syntax error$/ } @log; + my @raw_log = `../perl_checker .pl`; + die "@raw_log in .pl ($file):\n" . join('', @{$test->{lines}}) if any { /^syntax error$/ } @raw_log; + + my $f; + my @log = grep { + if (/^File "(.*)", line /) { + $f = $1; + 0; + } else { + $f eq '.pl'; + } + } @raw_log; + foreach my $i (0 .. max(int @{$test->{lines}}, int @log) - 1) { my $s = $test->{lines}[$i]; $s =~ s/\s+$//; |