PerlMol
view release on metacpan or search on metacpan
inc/BUNDLES/Math-VectorReal-1.02/test.pl view on Meta::CPAN
sub check_script_output {
my $script = shift;
print "not " unless -f $script.'.pl'; # script found?
print "ok ", $testnum++, "\t--- $script script ----\n";
open(OUT, "$script.out") || die;
open(TEST, "- |") or exec('perl', $script.'.pl') or exit 0;
$/=''; # read sections by paragraph
while( $t = <TEST> ) {
$o = <OUT>;
($testname) = split(/\n/,$t);
# ignore any white space funny busness
$t =~ s/\s+/ /; $t =~ s/^\s//; $t =~ s/\s$//;
$o =~ s/\s+/ /; $o =~ s/^\s//; $o =~ s/\s$//;
print "not " if $t ne $o;
print "ok ", $testnum++, "\t$testname\n"
}
( run in 0.348 second using v1.01-cache-2.11-cpan-49f99fa48dc )