[perl-DateTime/f20] Adjust tests to DateTime-TimeZone-1.74

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 7a22f1f6770a1b0efa703fbbec433bb9a61e7566
Author: Petr Písař <ppisar@xxxxxxxxxx>
Date:   Tue Sep 2 14:23:47 2014 +0200

    Adjust tests to DateTime-TimeZone-1.74

 DateTime-1.06-Fixes-for-latest-DT-TZ.patch |   59 ++++++++++++++++++++++++++++
 perl-DateTime.spec                         |    8 +++-
 2 files changed, 66 insertions(+), 1 deletions(-)
---
diff --git a/DateTime-1.06-Fixes-for-latest-DT-TZ.patch b/DateTime-1.06-Fixes-for-latest-DT-TZ.patch
new file mode 100644
index 0000000..8e5d5b0
--- /dev/null
+++ b/DateTime-1.06-Fixes-for-latest-DT-TZ.patch
@@ -0,0 +1,59 @@
+From a58b5dec4bb95c93425c8fedf678ef329626fe27 Mon Sep 17 00:00:00 2001
+From: Dave Rolsky <autarch@xxxxxxxx>
+Date: Sun, 31 Aug 2014 10:55:20 -0500
+Subject: [PATCH] Fixes for latest DT::TZ
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Petr Pisar: Ported to 1.06.
+
+Signed-off-by: Petr Písař <ppisar@xxxxxxxxxx>
+---
+ t/34set-tz.t | 26 +++++++++++++++-----------
+ 1 file changed, 15 insertions(+), 11 deletions(-)
+
+diff --git a/t/34set-tz.t b/t/34set-tz.t
+index c8b2173..08f5f54 100644
+--- a/t/34set-tz.t
++++ b/t/34set-tz.t
+@@ -21,21 +21,25 @@ use DateTime;
+ # DT::TZ
+ {
+     my $dt = DateTime->new(
+-        year      => 1934, month  => 2,  day    => 26,
+-        hour      => 0,    minute => 59, second => 59,
++        year      => 1922, month  => 8,  day    => 31,
++        hour      => 23,   minute => 59, second => 59,
+         time_zone => 'UTC',
+     );
+-    $dt->set_time_zone('Africa/Niamey');
++    $dt->set_time_zone('Africa/Accra');
+ 
+-    is( $dt->year,  1934, 'local year should be 1934 (1934-02-25 23:59:59)' );
+-    is( $dt->month, 2,    'local month should be 2 (1934-02-25 23:59:59)' );
+-    is( $dt->day,   25,   'local day should be 25 (1934-02-25 23:59:59)' );
+-    is( $dt->hour,  23,   'local hour should be 23 (1934-02-25 23:59:59)' );
+-    is( $dt->minute, 59, 'local minute should be 59 (1934-02-25 23:59:59)' );
+-    is( $dt->second, 59, 'local second should be 59 (1934-02-25 23:59:59)' );
++    is( $dt->year,  1922, 'local year should be 1922 (1922-08-31 23:59:59)' );
++    is( $dt->month, 8,    'local month should be 8 (1922-08-31 23:59:59)' );
++    is( $dt->day,   31,   'local day should be 31 (1922-08-31 23:59:59)' );
++    is( $dt->hour,  23,   'local hour should be 23 (1922-08-31 23:59:59)' );
++    is( $dt->minute, 59, 'local minute should be 59 (1922-08-31 23:59:59)' );
++    is( $dt->second, 59, 'local second should be 59 (1922-08-31 23:59:59)' );
+ 
+-    ok( !$dt->is_dst, 'is_dst should be false (1934-02-25 23:59:59)' );
+-    is( $dt->offset, -3600, 'offset should be -3600 (1934-02-25 23:59:59)' );
++    is( $dt->is_dst, 0, 'is_dst should be 0 (1922-08-31 23:59:59)' );
++    is( $dt->offset, 0, 'offset should be 0 (1922-08-31 23:59:59)' );
++    is(
++        $dt->time_zone_short_name, 'GMT',
++        'short name should be GMT (1922-08-31 23:59:59)'
++    );
+ }
+ 
+ {
+-- 
+1.9.3
+
diff --git a/perl-DateTime.spec b/perl-DateTime.spec
index 429ef76..a818318 100644
--- a/perl-DateTime.spec
+++ b/perl-DateTime.spec
@@ -1,7 +1,7 @@
 Name:           perl-DateTime
 Epoch:          2
 Version:        1.06
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Date and time object
 License:        Artistic 2.0
 Group:          Development/Libraries
@@ -10,6 +10,8 @@ Source0:        http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-%{version}.
 # Restore object after failed truncate() call, bug #1095104, CPAN RT#93347,
 # in 1.09
 Patch0:         DateTime-1.06-Don-t-leave-the-object-in-a-modified-state-after-a-f.patch
+# Adjust tests to DateTime-TimeZone-1.74, bug #1136263, CPAN RT#98483, in 1.11
+Patch1:         DateTime-1.06-Fixes-for-latest-DT-TZ.patch
 BuildRequires:  perl
 BuildRequires:  perl(Module::Build)
 BuildRequires:  perl(strict)
@@ -59,6 +61,7 @@ believed to be the birth of Jesus Christ.
 %prep
 %setup -q -n DateTime-%{version}
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__perl} Build.PL installdirs=vendor optimize="%{optflags}"
@@ -79,6 +82,9 @@ find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
 %{_mandir}/man3/*
 
 %changelog
+* Tue Sep 02 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 2:1.06-3
+- Adjust tests to DateTime-TimeZone-1.74 (bug #1136263)
+
 * Wed May 07 2014 Petr Pisar <ppisar@xxxxxxxxxx> - 2:1.06-2
 - Restore object after failed truncate() call (bug #1095104)
 
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel





[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux