Skip to content

Commit

Permalink
RunnerPretty: colour the summary output too
Browse files Browse the repository at this point in the history
  • Loading branch information
elliefm committed Jun 16, 2023
1 parent 65cbf7e commit d2600b6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cassandane/Cassandane/Unit/RunnerPretty.pm
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,28 @@ sub print_failures
}
}

sub print_header {
my $self = shift;
my ($result) = @_;
if ($result->was_successful()) {
$self->_print("\n",
$self->ansi([32], "OK"),
" (", $result->run_count(), " tests)\n");
} else {
my $failure_count = $result->failure_count()
? $self->ansi([33], $result->failure_count)
: "0";
my $error_count = $result->error_count()
? $self->ansi([31], $result->error_count)
: "0";

$self->_print("\n", $self->ansi([31], "!!!FAILURES!!!"), "\n",
"Test Results:\n",
"Run: ", $result->run_count(),
", Failures: $failure_count",
", Errors: $error_count",
"\n");
}
}

1;

0 comments on commit d2600b6

Please sign in to comment.