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';