summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-04-02 03:20:54 +0000
committerNorbert Preining <norbert@preining.info>2021-04-02 03:20:54 +0000
commit3f173002d4a4a84e7d1fa5a74755fdd00d08a9c2 (patch)
tree5ed380344702de1f9ab53b68b6c3bcd6b8458087 /systems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter
parentf78ba658b3ecd56053fe0837a4404d0c6c16a707 (diff)
CTAN sync 202104020320
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter')
-rwxr-xr-xsystems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter/TAP.pm26
1 files changed, 15 insertions, 11 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter/TAP.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter/TAP.pm
index 25961bf737..120c82d77b 100755
--- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter/TAP.pm
+++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Test2/Formatter/TAP.pm
@@ -2,7 +2,7 @@ package Test2::Formatter::TAP;
use strict;
use warnings;
-our $VERSION = '1.302162';
+our $VERSION = '1.302175';
use Test2::Util qw/clone_io/;
@@ -16,16 +16,17 @@ sub OUT_ERR() { 1 }
BEGIN { require Test2::Formatter; our @ISA = qw(Test2::Formatter) }
-# Not constants because this is a method, and can be overriden
-BEGIN {
- local $SIG{__DIE__} = 'DEFAULT';
- local $@;
- if (($INC{'Term/Table.pm'} && $INC{'Term/Table/Util.pm'}) || eval { require Term::Table; require Term::Table::Util; 1 }) {
- *supports_tables = sub { 1 };
- }
- else {
- *supports_tables = sub { 0 };
+my $supports_tables;
+sub supports_tables {
+ if (!defined $supports_tables) {
+ local $SIG{__DIE__} = 'DEFAULT';
+ local $@;
+ $supports_tables
+ = ($INC{'Term/Table.pm'} && $INC{'Term/Table/Util.pm'})
+ || eval { require Term::Table; require Term::Table::Util; 1 }
+ || 0;
}
+ return $supports_tables;
}
sub _autoflush {
@@ -270,7 +271,10 @@ sub assert_tap {
}
my %seen;
- my @order = grep { !$seen{$_}++ } sort keys %directives;
+
+ # Sort so that TODO comes before skip even on systems where lc sorts
+ # before uc, as other code depends on that ordering.
+ my @order = grep { !$seen{$_}++ } sort { lc $b cmp lc $a } keys %directives;
$directives = ' # ' . join ' & ' => @order;