Skip to content

Commit

Permalink
Merge pull request diffblue#2235 from thomasspriggs/test-pl-colour
Browse files Browse the repository at this point in the history
Colour code tests passing vs failing.
  • Loading branch information
Thomas Kiley authored May 29, 2018
2 parents 8befd02 + 77f8162 commit 9a0aa9c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions regression/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use strict;
use warnings;
use File::Basename;
use Term::ANSIColor;

use Cwd;

Expand Down Expand Up @@ -373,10 +374,10 @@ ($)
$skips++;
print " [SKIPPED]\n";
} elsif(0 == $failed_skipped) {
print " [OK] in $runtime seconds\n";
print " [" . colored("OK", "green") . "] in $runtime seconds\n";
} else {
$failures++;
print " [FAILED]\n";
print " [" . colored("FAILED", "red") . "]\n";
}
}
}
Expand Down Expand Up @@ -408,9 +409,9 @@ ($)
print "\n";

if($failures == 0) {
print "All tests were successful";
print colored("All tests were successful", "green");
} else {
print "Tests failed\n";
print colored("Tests failed", "red") . "\n";
print " $failures of $count " . (1==$count?"test":"tests") . " failed";
}
print ", $skips " . (1==$skips?"test":"tests") . " skipped" if($skips > 0);
Expand Down

0 comments on commit 9a0aa9c

Please sign in to comment.