Bug#564411: libdatetime-format-iso8601-perl: FTBFS: tests failed

gregor herrmann gregoa at debian.org
Sat Jan 9 19:36:54 UTC 2010


On Sat, 09 Jan 2010 13:49:47 +0100, Salvatore Bonaccorso wrote:

> > > #   Failed test at t/02_examples.t line 231.
> > > #          got: '2015'
> > > #     expected: '2005'

> I can confirm this, and it seem that it was reported upstream already
> 5 days ago: http://rt.cpan.org/Public/Bug/Display.html?id=53344

I looked at the upstream bug report, the code and ISO8601:2000(E)
now; if I understand it correctly
- a date of "-Y..." implies the decade
- the code currently adds the decade either from base_datetime or in
  its absence from the current time
- the test has a year of "5"
- which evaluates to 2015 since 2010-01-01 (unless there's
  base_datetime but that's not set in the test)

My tentative conclusion is that the code is correct, but the test has
a problem. The quick fix would be to change the expected value in the
tests to 2015; but that will lead to problems again in 10 years.
So maybe adding a base_datetime would be more futureproof? Or testing
for a range of possible results?

Cheers,
gregor
-- 
 .''`.   http://info.comodo.priv.at/ -- GPG Key IDs: 0x00F3CFE4, 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Joe Cocker: Don't Let Me Be Misunderstood
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20100109/f78ef1a6/attachment.pgp>


More information about the pkg-perl-maintainers mailing list