Skip to content

Commit

Permalink
Merge pull request #4531 from elliefm/v39/cass-coloured-summary
Browse files Browse the repository at this point in the history
RunnerPretty: colour the summary output too
  • Loading branch information
elliefm committed Jun 16, 2023
2 parents cf6eb8a + 36fc4a0 commit d4c7b44
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 d4c7b44

Please sign in to comment.