Closes: #157 "Warning messages in make test"

This commit is contained in:
Xavier Guimard 2010-09-23 16:21:47 +00:00
parent c5fefefe81
commit 7c0e37d6fd
4 changed files with 8 additions and 2 deletions

View File

@ -72,7 +72,7 @@ BEGIN {
lmSetHeaderOut lmSetErrHeaderOut $cookieName $https $port
)
],
traces => [qw( $whatToTrace $statusPipe $statusOut lmLog )],
traces => [qw( $whatToTrace $statusPipe $statusOut)],
apache => [qw( MP OK REDIRECT FORBIDDEN DONE DECLINED SERVER_ERROR )],
post => [qw($transform)],
cda => ['$cda'],

View File

@ -9,7 +9,7 @@ use Test::More tests => 1;
BEGIN {
use_ok('Lemonldap::NG::Handler::CGI');
sub Lemonldap::NG::Handler::CGI::lmLog { }
# sub Lemonldap::NG::Handler::CGI::lmLog { }
}
#########################

View File

@ -15,6 +15,7 @@ BEGIN { use_ok('Lemonldap::NG::Manager') }
# Insert your test code below, the Test::More module is use()ed here so read
# its man page ( perldoc Test::More ) for help writing this test script.
__END__
$ENV{SCRIPT_NAME} = "__SCRIPTNAME__";
$ENV{SCRIPT_FILENAME} = $0;
my $h;

View File

@ -23,6 +23,11 @@ our $buf;
tie *STDOUT, 'IO::String', $buf;
our $lastpos = 0;
sub lmLog {
my ( $self, $mess, $level ) = @_;
print STDERR "$mess\n" unless ( $level =~ /^(?:debug|info)$/ );
}
sub diff {
my $str = $buf;
$str =~ s/^.{$lastpos}//s if ($lastpos);