diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-15 03:06:35 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-15 03:06:35 +0000 |
commit | 12679ab7d3c2a210f4123163671b532b8b55d5f9 (patch) | |
tree | 0060d13467186ad977f4e73488ee20dd6c0017ab /systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm | |
parent | 62170822e034fdd3f81de7274835d0d3b0467100 (diff) |
CTAN sync 202403150306
Diffstat (limited to 'systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm')
-rw-r--r-- | systems/texlive/tlnet/tlpkg/tlperl/lib/Test/Builder.pm | 27 |
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); |