diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/TAP/Formatter/Console.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/TAP/Formatter/Console.pm | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/Master/tlpkg/tlperl/lib/TAP/Formatter/Console.pm b/Master/tlpkg/tlperl/lib/TAP/Formatter/Console.pm index 0a9115f9e48..5ac9fa1a16e 100644 --- a/Master/tlpkg/tlperl/lib/TAP/Formatter/Console.pm +++ b/Master/tlpkg/tlperl/lib/TAP/Formatter/Console.pm @@ -1,24 +1,21 @@ package TAP::Formatter::Console; use strict; -use TAP::Formatter::Base (); +use warnings; +use base 'TAP::Formatter::Base'; use POSIX qw(strftime); -use vars qw($VERSION @ISA); - -@ISA = qw(TAP::Formatter::Base); - =head1 NAME TAP::Formatter::Console - Harness output delegate for default console output =head1 VERSION -Version 3.26 +Version 3.30 =cut -$VERSION = '3.26'; +our $VERSION = '3.30'; =head1 DESCRIPTION @@ -70,16 +67,28 @@ sub _set_colors { } } +sub _failure_color { + my ($self) = @_; + + return $ENV{'HARNESS_SUMMARY_COLOR_FAIL'} || 'red'; +} + +sub _success_color { + my ($self) = @_; + + return $ENV{'HARNESS_SUMMARY_COLOR_SUCCESS'} || 'green'; +} + sub _output_success { my ( $self, $msg ) = @_; - $self->_set_colors('green'); + $self->_set_colors( $self->_success_color() ); $self->_output($msg); $self->_set_colors('reset'); } sub _failure_output { my $self = shift; - $self->_set_colors('red'); + $self->_set_colors( $self->_failure_color() ); my $out = join '', @_; my $has_newline = chomp $out; $self->_output($out); |