=cut
$VERSION = "2.57_05";
+$VERSION = eval $VERSION;
# Backwards compatibility for exportable variable names.
*verbose = *Verbose;
# state of the current test.
my @failed = grep { !$results{details}[$_-1]{ok} }
1..@{$results{details}};
- my @todo_pass = grep { $results{details}[$_-1]{ok} &&
+ my @todo_pass = grep { $results{details}[$_-1]{actual_ok} &&
$results{details}[$_-1]{type} eq 'todo' }
1..@{$results{details}};
max => $results{max},
failed => \@failed,
todo_pass => \@todo_pass,
+ todo => $results{todo},
bonus => $results{bonus},
skipped => $results{skip},
skip_reason => $results{skip_reason},
push(@msg, "$test{skipped}/$test{max} skipped: $test{skip_reason}")
if $test{skipped};
if ($test{bonus}) {
- my ($txt, $canon) = _canondetail($test{max},$test{skipped},'TODO passed',
+ my ($txt, $canon) = _canondetail($test{todo},0,'TODO passed',
@{$test{todo_pass}});
$todo_passed{$tfile} = {
canon => $canon,
- max => $test{max},
+ max => $test{todo},
failed => $test{bonus},
name => $tfile,
- percent => 100*$test{bonus}/$test{max},
+ percent => 100*$test{bonus}/$test{todo},
estat => '',
wstat => '',
};
if (_all_ok($tot)) {
$out .= "All tests successful$bonusmsg.\n";
if ($tot->{bonus}) {
- my($fmt_top, $fmt) = _create_fmts("Passed",$todo_passed);
+ my($fmt_top, $fmt) = _create_fmts("Passed Todo",$todo_passed);
# Now write to formats
for my $script (sort keys %{$todo_passed||{}}) {
my $Curtest = $todo_passed->{$script};
$tot->{max} - $tot->{ok}, $tot->{max},
$percent_ok;
- my($fmt_top, $fmt1, $fmt2) = _create_fmts("Failed",$failedtests);
+ my($fmt_top, $fmt1, $fmt2) = _create_fmts("Failed Test",$failedtests);
# Now write to formats
for my $script (sort keys %$failedtests) {
sub _create_fmts {
- my $type = shift;
+ my $failed_str = shift;
my $failedtests = shift;
+ my ($type) = split /\s/,$failed_str;
my $short = substr($type,0,4);
- my $failed_str = "$type Test";
- my $middle_str = " Stat Wstat Total $short $type ";
+ my $total = $short eq 'Pass' ? 'Todos' : 'Total';
+ my $middle_str = " Stat Wstat $total $short $type ";
my $list_str = "List of $type";
# Figure out our longest name string for formatting purposes.
my $skipped = shift;
my $type = shift;
my @detail = @_;
-
my %seen;
@detail = sort {$a <=> $b} grep !$seen{$_}++, @detail;
my $detail = @detail;