Skip Menu |

This queue is for tickets about the PerlIO-via-Logger CPAN distribution.

Report information
The Basics
Id: 25599
Status: resolved
Worked: 45 min
Priority: 0/
Queue: PerlIO-via-Logger

People
Owner: akaplan [...] cpan
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.03
Fixed in: (no value)



Subject: 'make test' fails - %02d is a bad format string to strftime()
'make test' fails: t/Logger.......... # Failed test 'check prefixed content' # at t/Logger.t line 45. # got: '[2d]Some Line # [2d]Another Line # ' # expected: '[21]Some Line # [21]Another Line # ' # Failed test 'read from the previously created file' # at t/Logger.t line 56. # got: '[2d][2d]Some Line # ' # expected: '[21][21]Some Line # ' # Looks like you failed 2 tests of 13. dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 8, 11 Failed 2/13 tests, 84.62% okay This is because the test code used %02d as a format for strftime. The correct format is %d (%02d is for printf). The attached patch corrects the problem.
Subject: logger.patch
--- t/Logger.t.orig 2007-03-21 09:35:30.000000000 -0400 +++ t/Logger.t 2007-03-21 09:35:40.000000000 -0400 @@ -16,8 +16,8 @@ BEGIN { use_ok('PerlIO::via::Logger') } can_ok( 'PerlIO::via::Logger',qw(format logify) ); -PerlIO::via::Logger->format('[%02d]'); -is( PerlIO::via::Logger->format,'[%02d]', 'check format' ); +PerlIO::via::Logger->format('[%d]'); +is( PerlIO::via::Logger->format,'[%d]', 'check format' ); my $file = 'testlog.f';
Subject: Re: [rt.cpan.org #25599] 'make test' fails - %02d is a bad format string to strftime()
Date: Wed, 21 Mar 2007 11:13:33 -0400
To: bug-PerlIO-via-Logger [...] rt.cpan.org
From: "Adam J. Kaplan" <adkap [...] adkap.com>
Ah interesting. strftime() actually accepts printf-style formatting strings on many systems. I'll get the patch in as soon as I have some free time. Thanks Adam On Mar 21, 2007, at 9:41 AM, Jerry D. Hedden via RT wrote: Show quoted text
> > Wed Mar 21 09:40:58 2007: Request 25599 was acted upon. > Transaction: Ticket created by JDHEDDEN > Queue: PerlIO-via-Logger > Subject: 'make test' fails - %02d is a bad format string to > strftime() > Broken in: 0.03 > Severity: Important > Owner: Nobody > Requestors: JDHEDDEN@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=25599 > > > > 'make test' fails: > > t/Logger.......... > # Failed test 'check prefixed content' > # at t/Logger.t line 45. > # got: '[2d]Some Line > # [2d]Another Line > # ' > # expected: '[21]Some Line > # [21]Another Line > # ' > > # Failed test 'read from the previously created file' > # at t/Logger.t line 56. > # got: '[2d][2d]Some Line > # ' > # expected: '[21][21]Some Line > # ' > # Looks like you failed 2 tests of 13. > dubious > Test returned status 2 (wstat 512, 0x200) > DIED. FAILED tests 8, 11 > Failed 2/13 tests, 84.62% okay > > This is because the test code used %02d as a format for strftime. The > correct format is %d (%02d is for printf). > > The attached patch corrects the problem. > <logger.patch>
This had been resolved. The new distro is in PAUSE, please allow a few hours for the mirrors to update. Status: Successfully indexed ============================ module: PerlIO::via::Logger version: 1.01 in file: PerlIO-via-Logger-1.01/lib/PerlIO/via/Logger.pm status: indexed