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 | f90d45d13c8162cc0876440208528afd16459317 (patch) | |
tree | 8877110327e21768b4ad314a5fb8628ec1c4fd8b /perl_checker.src/test/test_it | |
parent | 1fbcce27539293a3836e87e525b3d420f24497fd (diff) | |
download | perl-MDK-Common-f90d45d13c8162cc0876440208528afd16459317.tar perl-MDK-Common-f90d45d13c8162cc0876440208528afd16459317.tar.gz perl-MDK-Common-f90d45d13c8162cc0876440208528afd16459317.tar.bz2 perl-MDK-Common-f90d45d13c8162cc0876440208528afd16459317.tar.xz perl-MDK-Common-f90d45d13c8162cc0876440208528afd16459317.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/test/test_it')
-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+$//; |