Skip Menu |

This queue is for tickets about the DateTime-Format-Alami CPAN distribution.

Report information
The Basics
Id: 114108
Status: resolved
Priority: 0/
Queue: DateTime-Format-Alami

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

Bug Information
Severity: (no value)
Broken in: 0.07
Fixed in: (no value)



Subject: t/EN.t and t/ID.t fail on some days of the year
Tests failed for example yesterday (2016-04-30), and some experiments show that it will fail on every 30th and 31th of a month. To reproduce try something like: env PERL5OPT=-MTime::Fake=$(date --date="2016-04-30 12:00:00" +%s) perl5.22.2 -Mblib t/EN.t Test output: ... not ok 16 - 28feb # Failed test '28feb' # at /opt/perl-5.22.2/lib/5.22.2/Test/Builder.pm line 279. Invalid day of month (day = 30 - month = 2 - year = 2016) at /tmpfs/.cpan-build-cpansand/2016050103/DateTime-Format-Alami-0.07-3R_8Hg/blib/lib/DateTime/Format/Alami.pm line 305. # Child (test suite for DateTime::Format::Alami::EN) exited without calling finalize() not ok 1 - test suite for DateTime::Format::Alami::EN # Failed test 'test suite for DateTime::Format::Alami::EN' # at /opt/perl-5.22.2/lib/5.22.2/Test/Builder.pm line 279. ...
On Sun, 1 May 2016 05:55:56 GMT, SREZIC wrote: Show quoted text
> Tests failed for example yesterday (2016-04-30), and some experiments > show that it will fail on every 30th and 31th of a month. To reproduce > try something like: > > env PERL5OPT=-MTime::Fake=$(date --date="2016-04-30 12:00:00" +%s) > perl5.22.2 -Mblib t/EN.t > > Test output: > > ... > not ok 16 - 28feb > # Failed test '28feb' > # at /opt/perl-5.22.2/lib/5.22.2/Test/Builder.pm line 279. > Invalid day of month (day = 30 - month = 2 - year = 2016) > at /tmpfs/.cpan-build-cpansand/2016050103/DateTime-Format-Alami-0.07- > 3R_8Hg/blib/lib/DateTime/Format/Alami.pm line 305. > # Child (test suite for DateTime::Format::Alami::EN) exited > without calling finalize() > not ok 1 - test suite for DateTime::Format::Alami::EN > # Failed test 'test suite for DateTime::Format::Alami::EN' > # at /opt/perl-5.22.2/lib/5.22.2/Test/Builder.pm line 279. > ...
Fixed. This is a code ordering issue: set_month() must be done after set_day(), e.g. when day of month is 30, we cannot set month to February. We must first set day to 28, then month.