From bfe69b02ea6502de4e39e4a54183489cef89c093 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 24 Apr 2006 15:24:32 +0000 Subject: 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)) --- perl_checker.src/test/test_it | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'perl_checker.src/test') 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+$//; -- cgit v1.2.1