Skip Menu |

This queue is for tickets about the Test-Warn CPAN distribution.

Report information
The Basics
Id: 74827
Status: resolved
Priority: 0/
Queue: Test-Warn

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: KENTNL [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 0.23
Fixed in: 0.23_01



Subject: Bleadperl v5.15.7-200-g879b0ca breaks CHORNY/Test-Warn-0.23.tar.gz
I fixed it, but then after dos2unix `find -type f` crlf issues came up.
Subject: Test-Warn-0.23.patch
difforig Test-Warn-0.23 [CPAN #74827] See Changes diff -u Test-Warn-0.23/Changes.orig --- Test-Warn-0.23/Changes.orig 2012-02-10 14:58:13.200603300 -0600 +++ Test-Warn-0.23/Changes 2012-02-10 14:58:13.200603300 -0600 @@ -1,5 +1,10 @@ Revision history for Perl extension Test::Warn. +0.24 2012-02-10 14:49:49 rurban + - compatibility with Perl 5.16, Carp 1.25 (RURBAN) + - dos2unix + - test fixes for Win95 + 0.23 2011-02-24 - compatibility with Perl 5.14 (ANDK) diff -u Test-Warn-0.23/t/warning_is.t.orig --- Test-Warn-0.23/t/warning_is.t.orig 2012-02-10 14:58:13.192603368 -0600 +++ Test-Warn-0.23/t/warning_is.t 2012-02-10 15:00:17.627517197 -0600 @@ -93,8 +93,10 @@ "at", __FILE__, "line", - CARP_LINE) ) # Note the difference, that carp msg - : "didn't find a warning"; # aren't finished by '.' + CARP_LINE, + ($Carp::VERSION gt "1.24"?".":"") + ) ) # Note the difference, that carp msg + : "didn't find a warning"; # weren't finished by '.' } sub _exp_carp_msg { diff -u Test-Warn-0.23/t/warning_like.t.orig --- Test-Warn-0.23/t/warning_like.t.orig 2012-02-10 14:58:13.192603368 -0600 +++ Test-Warn-0.23/t/warning_like.t 2012-02-10 15:01:52.878678696 -0600 @@ -96,8 +96,10 @@ "at", __FILE__, "line", - CARP_LINE) ) # Note the difference, that carp msg - : "didn't find a warning"; # aren't finished by '.' + CARP_LINE, + ($Carp::VERSION gt "1.24"?".":"") + ) ) # Note the difference, that carp msg + : "didn't find a warning"; # wasn't finished by '.' } sub _exp_carp_msg { diff -u Test-Warn-0.23/t/warnings_are.t.orig --- Test-Warn-0.23/t/warnings_are.t.orig 2012-02-10 14:58:13.192603368 -0600 +++ Test-Warn-0.23/t/warnings_are.t 2012-02-10 15:01:23.438941131 -0600 @@ -85,7 +85,9 @@ } sub _found_carp_msg { - @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_) + @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE + .($Carp::VERSION gt "1.24"?".":"") + } @_) : "didn't find a warning"; } diff -u Test-Warn-0.23/t/warnings_like.t.orig --- Test-Warn-0.23/t/warnings_like.t.orig 2012-02-10 14:58:13.192603368 -0600 +++ Test-Warn-0.23/t/warnings_like.t 2012-02-10 15:00:55.531186007 -0600 @@ -88,7 +88,9 @@ } sub _found_carp_msg { - @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_) + @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE + .($Carp::VERSION gt "1.24"?".":"") + } @_) : "didn't find a warning"; }
Scratch the first patch, this works now. I missed some parts. Note that this has 2 commits, t/carped.t is patched twice. -- Reini Urban
Subject: Test-Warn-0.23.patch
commit d74c8f9a2ad374ff03a69a80226aeba23ced33bd Author: Reini Urban <rurban@cpanel.net> Date: Fri Feb 10 15:56:06 2012 -0600 [CPAN #74827] Carp 1.25 has now a dot diff --git a/Changes b/Changes index d01b0c3..ea92f16 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension Test::Warn. +0.24 2012-02-10 14:49:49 rurban + - compatibility with Perl 5.16, Carp 1.25 (RURBAN) + - test fixes for Win95 + 0.23 2011-02-24 - compatibility with Perl 5.14 (ANDK) diff --git a/MYMETA.json b/MYMETA.json diff --git a/t/carped.t b/t/carped.t index cc4df22..60c9a4d 100644 --- a/t/carped.t +++ b/t/carped.t @@ -29,8 +29,8 @@ test_test "Warnings and Carpings mixed, asked only for like warnings"; test_out "not ok 1"; my @test_diag = ( "found warning: Warning 1 at $tcarped line 13.", -"found carped warning: Carping 2 at $tcarped line 14", -"found carped warning: Carping 3 at $tcarped line 15", +"found carped warning: Carping 2 at $tcarped line 14".($Carp::VERSION gt "1.24"?".":""), +"found carped warning: Carping 3 at $tcarped line 15".($Carp::VERSION gt "1.24"?".":""), "found warning: Warning 4 at $tcarped line 16.", "expected to find carped warning: (?-xism:1)", "expected to find carped warning: (?-xism:2)", @@ -56,8 +56,8 @@ test_out "not ok 1"; test_fail +10; test_diag "found warning: Warning 1 at $tcarped line 13.", -"found carped warning: Carping 2 at $tcarped line 14", -"found carped warning: Carping 3 at $tcarped line 15", +"found carped warning: Carping 2 at $tcarped line 14".($Carp::VERSION gt "1.24"?".":""), +"found carped warning: Carping 3 at $tcarped line 15".($Carp::VERSION gt "1.24"?".":""), "found warning: Warning 4 at $tcarped line 16.", "expected to find carped warning: Warning 1", "expected to find carped warning: Carping 2", diff --git a/t/warning_is.t b/t/warning_is.t index 33b0696..e18aaa6 100644 --- a/t/warning_is.t +++ b/t/warning_is.t @@ -93,8 +93,9 @@ sub _found_carp_msg { "at", __FILE__, "line", - CARP_LINE) ) # Note the difference, that carp msg - : "didn't find a warning"; # aren't finished by '.' + CARP_LINE.($Carp::VERSION gt "1.24"?".":"") + ) ) # Note the difference, that carp msg + : "didn't find a warning"; # weren't finished by '.' } sub _exp_carp_msg { diff --git a/t/warning_like.t b/t/warning_like.t index bd4a7dd..87347b0 100644 --- a/t/warning_like.t +++ b/t/warning_like.t @@ -96,8 +96,9 @@ sub _found_carp_msg { "at", __FILE__, "line", - CARP_LINE) ) # Note the difference, that carp msg - : "didn't find a warning"; # aren't finished by '.' + CARP_LINE.($Carp::VERSION gt "1.24"?".":"") + ) ) # Note the difference, that carp msg + : "didn't find a warning"; # wasn't finished by '.' } sub _exp_carp_msg { diff --git a/t/warnings_are.t b/t/warnings_are.t index a14af98..6b47dfc 100644 --- a/t/warnings_are.t +++ b/t/warnings_are.t @@ -85,7 +85,9 @@ sub _found_warn_msg { } sub _found_carp_msg { - @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_) + @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE + .($Carp::VERSION gt "1.24"?".":"") + } @_) : "didn't find a warning"; } diff --git a/t/warnings_like.t b/t/warnings_like.t index 4ec22c2..e1d17b9 100644 --- a/t/warnings_like.t +++ b/t/warnings_like.t @@ -88,7 +88,9 @@ sub _found_warn_msg { } sub _found_carp_msg { - @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_) + @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE + .($Carp::VERSION gt "1.24"?".":"") + } @_) : "didn't find a warning"; } commit 3c9c219542cd7ea1b963e25614dcd1444305ee71 Author: Reini Urban <rurban@cpanel.net> Date: Fri Feb 10 16:00:29 2012 -0600 test fixes for Win95 diff --git a/t/carped.t b/t/carped.t index 60c9a4d..6023652 100644 --- a/t/carped.t +++ b/t/carped.t @@ -16,11 +16,8 @@ sub foo { warn "Warning 4"; } -#use File::Spec; -#my $tcarped = File::Spec->catfile('t','carped.t'); -#$tcarped =~ s/\\/\//g if $^O eq 'MSWin32'; -#also will not work on VMS -my $tcarped = 't/carped.t'; +# VMS should work because of vmsify on unix paths +my $tcarped = $^O eq 'MSWin32'?'t\carped.t':'t/carped.t'; test_out "ok 1"; warnings_like {foo()} [map {qr/$_/} (1 .. 4)];