summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/TAP/Formatter/Base.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl/lib/TAP/Formatter/Base.pm')
-rw-r--r--Master/tlpkg/tlperl/lib/TAP/Formatter/Base.pm25
1 files changed, 15 insertions, 10 deletions
diff --git a/Master/tlpkg/tlperl/lib/TAP/Formatter/Base.pm b/Master/tlpkg/tlperl/lib/TAP/Formatter/Base.pm
index f2b54a9ba3e..678ea2f0e3d 100644
--- a/Master/tlpkg/tlperl/lib/TAP/Formatter/Base.pm
+++ b/Master/tlpkg/tlperl/lib/TAP/Formatter/Base.pm
@@ -43,15 +43,15 @@ BEGIN {
=head1 NAME
-TAP::Formatter::Console - Harness output delegate for default console output
+TAP::Formatter::Base - Base class for harness output delegates
=head1 VERSION
-Version 3.17
+Version 3.23
=cut
-$VERSION = '3.17';
+$VERSION = '3.23';
=head1 DESCRIPTION
@@ -206,7 +206,7 @@ sub prepare {
my $longest = 0;
- foreach my $test (@tests) {
+ for my $test (@tests) {
$longest = length $test if length $test > $longest;
}
@@ -257,13 +257,15 @@ sub _output_success {
$harness->summary( $aggregate );
-C<summary> prints the summary report after all tests are run. The argument is
-an aggregate.
+C<summary> prints the summary report after all tests are run. The first
+argument is an aggregate to summarise. An optional second argument may
+be set to a true value to indicate that the summary is being output as a
+result of an interrupted test run.
=cut
sub summary {
- my ( $self, $aggregate ) = @_;
+ my ( $self, $aggregate, $interrupted ) = @_;
return if $self->silent;
@@ -279,6 +281,9 @@ sub summary {
$self->_output( $self->_format_now(), "\n" );
}
+ $self->_failure_output("Test run interrupted!\n")
+ if $interrupted;
+
# TODO: Check this condition still works when all subtests pass but
# the exit status is nonzero
@@ -290,7 +295,7 @@ sub summary {
if ( $total != $passed or $aggregate->has_problems ) {
$self->_output("\nTest Summary Report");
$self->_output("\n-------------------\n");
- foreach my $test (@$tests) {
+ for my $test (@$tests) {
$self->_printed_summary_header(0);
my ($parser) = $aggregate->parsers($test);
$self->_output_summary_failure(
@@ -330,7 +335,7 @@ sub summary {
sprintf " Parse errors: %s\n",
shift @errors
);
- foreach my $error (@errors) {
+ for my $error (@errors) {
my $spaces = ' ' x 16;
$self->_failure_output("$spaces$error\n");
}
@@ -422,7 +427,7 @@ sub _range {
@numbers = sort { $a <=> $b } @numbers;
my ( $min, @range );
- foreach my $i ( 0 .. $#numbers ) {
+ for my $i ( 0 .. $#numbers ) {
my $num = $numbers[$i];
my $next = $numbers[ $i + 1 ];
if ( defined $next && $next == $num + 1 ) {