Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Time-Tiny CPAN distribution.

Report information
The Basics
Id: 114238
Status: resolved
Priority: 0/
Queue: Time-Tiny

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

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



Subject: Test failure under newer DateTime::Locale
As of version 0.90, DateTime::Locale reports the name of the "C" locale as "en-US-POSIX". This means that if that module and DateTime are installed, the Time::Tiny test suite fails, because it expects to see only "C". The attached patch handles this change by relaxing the relevant test case.
Subject: 0001-Fix-test-under-DateTime-Locale-0.90.patch
From cec08a2d1fa23050b9e929670f6d73ddb8b3b69b Mon Sep 17 00:00:00 2001 From: Aaron Crane <arc@cpan.org> Date: Sun, 8 May 2016 15:40:35 +0100 Subject: [PATCH] Fix test under DateTime::Locale >= 0.90 As of this version, a DateTime instance created with the "C" locale specified will report its locale as "en-US-POSIX" rather than "C", as described in this Changes entry: https://github.com/autarch/DateTime-Locale/commit/a45cb5e6543dbd4eb766788db1b44a836157f4a0#diff-c112bb3542e98308d12d5ecb10a67abc Handle this by treating either value as correct in the test. --- t/02_main.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/02_main.t b/t/02_main.t index 6b4e621..1ac2cfa 100644 --- a/t/02_main.t +++ b/t/02_main.t @@ -62,7 +62,9 @@ SKIP: { # Expand to a DateTime my $dt = $date->DateTime; isa_ok( $dt, 'DateTime' ); - is( $dt->locale->id, 'C', '->locate ok' ); + # DateTime::Locale >= 0.90 report "en-US-POSIX"; earlier say "C" + my %expected_locale = (C => 1, 'en-US-POSIX' => 1); + ok( $expected_locale{ $dt->locale->id }, '->locale ok' ); is( $dt->time_zone->name, 'floating', '->timezone ok' ); # Compare accessor results -- 2.7.4
On 2016-05-08 10:50:22, arc@cpan.org wrote: Show quoted text
> As of version 0.90, DateTime::Locale reports the name of the "C" > locale as "en-US-POSIX". This means that if that module and DateTime > are installed, the Time::Tiny test suite fails, because it expects to > see only "C". > > The attached patch handles this change by relaxing the relevant test > case.
Duplicate of https://rt.cpan.org/Public/Bug/Display.html?id=108636
Fixed in Time-Tiny-1.06-TRIAL