summaryrefslogtreecommitdiff
path: root/systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm
diff options
context:
space:
mode:
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm')
-rw-r--r--systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm27
1 files changed, 12 insertions, 15 deletions
diff --git a/systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm b/systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm
index 6c3cceec99..4c14dc4817 100644
--- a/systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm
+++ b/systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm
@@ -4,7 +4,7 @@ use 5.006;
use strict;
use warnings;
-our $VERSION = '1.302183';
+our $VERSION = '1.302194';
BEGIN {
if( $] < 5.008 ) {
@@ -655,6 +655,8 @@ sub skip_all {
die 'Label not found for "last T2_SUBTEST_WRAPPER"' if $begin && $ctx->hub->meta(__PACKAGE__, {})->{parent};
}
+ $reason = "$reason" if defined $reason;
+
$ctx->plan(0, SKIP => $reason);
}
@@ -765,7 +767,7 @@ sub _unoverload {
require overload;
}
my $string_meth = overload::Method( $$thing, $type ) || return;
- $$thing = $$thing->$string_meth();
+ $$thing = $$thing->$string_meth(undef, 0);
}
sub _unoverload_str {
@@ -1000,15 +1002,7 @@ END
$self->_is_diag( $got, $type, $expect );
}
elsif( $type =~ /^(ne|!=)$/ ) {
- no warnings;
- my $eq = ($got eq $expect || $got == $expect)
- && (
- (defined($got) xor defined($expect))
- || (length($got) != length($expect))
- );
- use warnings;
-
- if ($eq) {
+ if (defined($got) xor defined($expect)) {
$self->_cmp_diag( $got, $type, $expect );
}
else {
@@ -1072,6 +1066,13 @@ sub skip {
my $ctx = $self->ctx;
+ $name = "$name";
+ $why = "$why";
+
+ $name =~ s|#|\\#|g; # # in a name can confuse Test::Harness.
+ $name =~ s{\n}{\n# }sg;
+ $why =~ s{\n}{\n# }sg;
+
$ctx->hub->meta(__PACKAGE__, {})->{Test_Results}[ $ctx->hub->count ] = {
'ok' => 1,
actual_ok => 1,
@@ -1080,10 +1081,6 @@ sub skip {
reason => $why,
} unless $self->{no_log_results};
- $name =~ s|#|\\#|g; # # in a name can confuse Test::Harness.
- $name =~ s{\n}{\n# }sg;
- $why =~ s{\n}{\n# }sg;
-
my $tctx = $ctx->snapshot;
$tctx->skip('', $why);