[libdatetime-timezone-perl] 08/13: Pass tests when ecetera timezones are included

gregor herrmann gregoa at debian.org
Wed Apr 15 19:03:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to annotated tag v1.76
in repository libdatetime-timezone-perl.

commit 6284a88e93a100405b843071c4064b52f62d28f6
Author: Alfie John <alfiej at fastmail.fm>
Date:   Wed Aug 20 01:39:09 2014 +0000

    Pass tests when ecetera timezones are included
---
 t/02basic.t | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/t/02basic.t b/t/02basic.t
index 856f461..f025ced 100644
--- a/t/02basic.t
+++ b/t/02basic.t
@@ -11,18 +11,21 @@ BEGIN { require 'check_datetime_version.pl' }
 use DateTime::TimeZone;
 
 my @names = DateTime::TimeZone::all_names();
+my %links = DateTime::TimeZone->links();
 
 my $is_maintainer = -d '.hg' || $ENV{RELEASE_TESTING} ? 1 : 0;
 
 foreach my $name (@names) {
+    my $resolved_name = $links{$name} || $name;
+
     my $tz = DateTime::TimeZone->new( name => $name );
     isa_ok( $tz, 'DateTime::TimeZone' );
 
-    is( $tz->name, $name, 'check ->name' );
+    is( $tz->name, $resolved_name, 'check ->name' );
 
     is( $tz->is_floating, 0, 'should not be floating' );
     is( $tz->is_utc,      0, 'should not be UTC' )
-        unless $name eq 'UTC';
+        unless $resolved_name eq 'UTC';
 
     # adding these tests makes the test suite take a _long_ time to
     # finish, and it uses up lots of memory too.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdatetime-timezone-perl.git



More information about the Pkg-perl-cvs-commits mailing list