Y
yusuf
Heres a file t.pl:
#!/usr/bin/perl
use Test::Harness;
$Test::Harness::Verbose=true;
$|=1;
print "before\n";
my $allok = runtests("tests.pl");
print " all ok? :" . $allok ." \n";
print "total ran: ".$total;
print "\nfailed: ".$failed;
and the file tests.pl is:
#!/usr/bin/perl
use Test::More tests => 1;
ok( $foo eq $bar, 'foo is bar' );
print "hello owlrd!";
print STDERR "hello err";
ok( $foo eq $bar, 'foo is bar2' );
1;
My problem is that in t.pl, the print "before" gets printed, but not
the other print statements after the runtests(). I want to be able to
determine after a test run, how many tests passed, failed and errored.
So I can log them to a server.
Thanks.
#!/usr/bin/perl
use Test::Harness;
$Test::Harness::Verbose=true;
$|=1;
print "before\n";
my $allok = runtests("tests.pl");
print " all ok? :" . $allok ." \n";
print "total ran: ".$total;
print "\nfailed: ".$failed;
and the file tests.pl is:
#!/usr/bin/perl
use Test::More tests => 1;
ok( $foo eq $bar, 'foo is bar' );
print "hello owlrd!";
print STDERR "hello err";
ok( $foo eq $bar, 'foo is bar2' );
1;
My problem is that in t.pl, the print "before" gets printed, but not
the other print statements after the runtests(). I want to be able to
determine after a test run, how many tests passed, failed and errored.
So I can log them to a server.
Thanks.