Subject: | green color in successful message |
I want to see the green color in reporting messages at successful case, like JUnit.
screenshot: http://gyazo.com/cbe3c4ed8ef2f4c0c88fa9eb16f85000.png
patche is follow:
Show quoted text
>||
=== lib/TAP/Formatter/Console.pm
=========================================================
=========
--- lib/TAP/Formatter/Console.pm (revision 13374)
+++ lib/TAP/Formatter/Console.pm (local)
@@ -301,7 +301,9 @@
# the exit status is nonzero
if ( $aggregate->all_passed ) {
+ $self->_set_colors('green');
$self->_output("All tests successful.\n");
+ $self->_set_colors('reset');
}
# ~TODO option where $aggregate->skipped generates reports
=== t/harness.t
=========================================================
=========
--- t/harness.t (revision 13374)
+++ t/harness.t (local)
@@ -117,7 +117,9 @@
'ok 1 - this is a test',
'[[reset]]',
'ok',
+ '[[green]]',
'All tests successful.',
+ '[[reset]]',
);
my $status = pop @output;
my $expected_status = qr{^Result: PASS$};
@@ -148,7 +150,9 @@
'ok 1 - this is a test',
'[[reset]]',
'ok',
+ '[[green]]',
'All tests successful.',
+ '[[reset]]',
);
$status = pop @output;
$expected_status = qr{^Result: PASS$};
@@ -187,7 +191,9 @@
'ok 1 - this is a test',
'[[reset]]',
'ok',
+ '[[green]]',
'All tests successful.',
+ '[[reset]]',
);
$status = pop @output;
$expected_status = qr{^Result: PASS$};
||<