Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dist-Zilla CPAN distribution.

Report information
The Basics
Id: 58947
Status: resolved
Priority: 0/
Queue: Dist-Zilla

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 4.101740
  • 4.101780
Fixed in: (no value)



Subject: t/plugins/pkgdist.t and t/plugins/pkgversion.t test failures
Hello and thank you for Dist::Zilla, I couldn't find a bug report on this. perl, v5.8.7 built for x86_64-linux Dist::Zilla 4.101740 and 4.101780 Test Summary Report ------------------- t/plugins/pkgdist.t (Wstat: 1024 Tests: 11 Failed: 4) Failed tests: 1-3, 5 Non-zero exit status: 4 t/plugins/pkgversion.t (Wstat: 1024 Tests: 11 Failed: 4) Failed tests: 1-3, 5 Non-zero exit status: 4 Files=25, Tests=275, 61 wallclock secs ( 0.16 usr 0.08 sys + 30.29 cusr 6.13 csys = 36.66 CPU) Result: FAIL Failed 2/25 test programs. 8/275 subtests failed. I had to make the following changes to get the tests to pass: ==== Dist-Zilla-4.101780/t/plugins/pkgdist.t#1 - Dist-Zilla- 4.101780/t/plugins/pkgdist.t ==== 76c76 < qr{^\s*\$\QDZT::Sample::DIST = 'DZT-Sample';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::Sample::DIST = 'DZT-Sample';\E\s*$}m,
83c83 < qr{^\s*\$\QDZT::TP1::DIST = 'DZT-Sample';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::TP1::DIST = 'DZT-Sample';\E\s*$}m,
89c89 < qr{^\s*\$\QDZT::TP2::DIST = 'DZT-Sample';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::TP2::DIST = 'DZT-Sample';\E\s*$}m,
103c103 < qr{^\s*\$\QDZT::Script::DIST = 'DZT-Sample';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::Script::DIST = 'DZT-Sample';\E\s*$}m,
==== Dist-Zilla-4.101780/t/plugins/pkgversion.t#1 - Dist-Zilla- 4.101780/t/plugins/pkgversion.t ==== 76c76 < qr{^\s*\$\QDZT::Sample::VERSION = '0.001';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::Sample::VERSION = '0.001';\E\s*$}m,
83c83 < qr{^\s*\$\QDZT::TP1::VERSION = '0.001';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::TP1::VERSION = '0.001';\E\s*$}m,
89c89 < qr{^\s*\$\QDZT::TP2::VERSION = '0.001';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::TP2::VERSION = '0.001';\E\s*$}m,
103c103 < qr{^\s*\$\QDZT::Script::VERSION = '0.001';\E$}m, --- Show quoted text
> qr{^\s*\$\QDZT::Script::VERSION = '0.001';\E\s*$}m,
Cheers, Peter (Stig) Edwards
Subject: Re: [rt.cpan.org #58947] t/plugins/pkgdist.t and t/plugins/pkgversion.t test failures
Date: Tue, 29 Jun 2010 11:34:11 -0400
To: Peter John Edwards via RT <bug-Dist-Zilla [...] rt.cpan.org>
From: Ricardo Signes <rjbs [...] cpan.org>
* Peter John Edwards via RT <bug-Dist-Zilla@rt.cpan.org> [2010-06-29T10:29:56] Show quoted text
> Hello and thank you for Dist::Zilla,
I'm glad if it's useful! Show quoted text
> I couldn't find a bug report on this. > perl, v5.8.7 built for x86_64-linux
Thanks. This bug is fixed in 5.8.9 and later perls. I will either incorporate your patch or up the minimum perl soon. (I am already on the fence about moving to require 5.10.x) -- rjbs
Show quoted text
> On Tue Jun 29 11:34:32 2010, RJBS wrote:
Show quoted text
> Thanks. This bug is fixed in 5.8.9 and later perls.
I wasn't aware of this bug in 5.8.7, I boiled it down to if( qq{Line1\nLine2\n} !~ qr{Line1$}m ){ print 'no '; } print "match \n"; I think the bug is http://rt.perl.org/rt3/Public/Bug/Display.html?id=3038 I don't know why adding "\s*" avoids the qr bug. I changed the tests to use ok() and index() to avoid the bug: ok( index( $dzt_sample, q{$DZT::Sample::DIST = 'DZT-Sample';} ), 'added version to DZT::Sample'); Cheers.
Subject: Re: [rt.cpan.org #58947] t/plugins/pkgdist.t and t/plugins/pkgversion.t test failures
Date: Wed, 30 Jun 2010 07:18:32 -0400
To: Peter John Edwards via RT <bug-Dist-Zilla [...] rt.cpan.org>
From: Ricardo Signes <rjbs [...] cpan.org>
* Peter John Edwards via RT <bug-Dist-Zilla@rt.cpan.org> [2010-06-30T05:50:39] Show quoted text
> > I don't know why adding "\s*" avoids the qr bug. I changed the tests to > use ok() and index() to avoid the bug: > > ok( index( $dzt_sample, q{$DZT::Sample::DIST = 'DZT-Sample';} ), 'added > version to DZT::Sample'); >
Your previous patch was definitely better. The \s* works because the \s* eats the newline before the $, which *should* work without it. Your new test is, frankly, just wrong. For example: use strict; use Test::More 'no_plan'; my $dzt_sample = 'cakes and ale'; ok( index( $dzt_sample, q{$DZT::Sample::DIST = 'DZT-Sample';} ), 'added version to DZT::Sample' ); In index(x,y), if y is not a substring of x, the result is -1, which is true. Anyway, the previous patch is better. I'll deal with this bug very soon. (I suggest you upgrade your perl if at all possible, anyway, though.) -- rjbs
Show quoted text
> On Wed Jun 30 07:18:41 2010, RJBS wrote: > Your previous patch was definitely better. The \s* works because the > \s* eats the newline before the $, which *should* work without it.
Ah, thanks for the explanation. Show quoted text
> Your new test is, frankly, just wrong. For example: > > use strict; > use Test::More 'no_plan'; > > my $dzt_sample = 'cakes and ale'; > ok( > index( $dzt_sample, q{$DZT::Sample::DIST = 'DZT-Sample';} ), > 'added version to DZT::Sample' > ); > > In index(x,y), if y is not a substring of x, the result is -1, which > is true.
Oops, should have been " 0 < index(... " or possibly " 0 <= index(..." Show quoted text
> Anyway, the previous patch is better. I'll deal with this bug very > soon. (I suggest you upgrade your perl if at all possible, anyway,
though.) You'll be please to know the $work perl upgrade to 5.12.2 is underway for our Linux hosts, the VMS clusters will probably be sticking to 5.8.7 for some more time to come, however, I don't think I'll be working on getting Dist::Zilla and all it's prereqs working on VMS unless it's use takes off within $work. Thanks.
I've applied a patch for now, although I look forward to requiring 5.10. -- rjbs