commit b5ec8120480f3f257d283ea857e9ea1fb59de8f9 Author: Petr Šabata <contyk@xxxxxxxxxx> Date: Mon Jan 12 14:35:21 2015 +0100 Adapt the test suite for the 2015-2115 era Date-Calc-XS-6.3-century.patch | 433 ++++++++++++++++++++++++++++++++++++++++ perl-Date-Calc-XS.spec | 8 +- 2 files changed, 440 insertions(+), 1 deletions(-) --- diff --git a/Date-Calc-XS-6.3-century.patch b/Date-Calc-XS-6.3-century.patch new file mode 100644 index 0000000..b810482 --- /dev/null +++ b/Date-Calc-XS-6.3-century.patch @@ -0,0 +1,433 @@ +From e65ad7f563386aa0bf43f6de9e2b3f2dc49e565d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@xxxxxxxxxx> +Date: Wed, 7 Jan 2015 14:45:13 +0100 +Subject: [PATCH] Adapt the test suite for the next 100 years +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We're now closer to year 2064 than 1964, therefore dates with two-digit +years decode differently now. + +Signed-off-by: Petr Šabata <contyk@xxxxxxxxxx> +--- + t/f016.t | 32 ++++++++++++++++---------------- + t/f027.t | 44 ++++++++++++++++++++++---------------------- + t/f028.t | 44 ++++++++++++++++++++++---------------------- + 3 files changed, 60 insertions(+), 60 deletions(-) + +diff --git a/t/f016.t b/t/f016.t +index 1adfc8a..5d2eab2 100644 +--- a/t/f016.t ++++ b/t/f016.t +@@ -17,19 +17,19 @@ print "1..25\n"; + + $n = 1; + if ((($year,$mm,$dd) = Decode_Date_EU("3.1.64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("3 1 64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("03.01.64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("03/01/64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene 1964",4)) && +@@ -37,11 +37,11 @@ if ((($year,$mm,$dd) = Decode_Date_EU("3. Ene 1964",4)) && + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("Geburtstag: 3. Januar '64 in Backnang/W�berg",3)) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("03-Jan-64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan1964",6)) && +@@ -49,19 +49,19 @@ if ((($year,$mm,$dd) = Decode_Date_EU("3.Jan1964",6)) && + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("3Jan64",0)) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("030164")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("3ja64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_EU("3164")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -74,15 +74,15 @@ unless (($year,$mm,$dd) = Decode_Date_EU("29.2.1995")) + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US("1 3 64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_US("01/03/64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 '64")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_US("Jan 3 1964")) && +@@ -98,15 +98,15 @@ if ((($year,$mm,$dd) = Decode_Date_US("Jan31964")) && + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_US("Jan364")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_US("ja364")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + if ((($year,$mm,$dd) = Decode_Date_US("1364")) && +-($year==1964)&&($mm==1)&&($dd==3)) ++($year==2064)&&($mm==1)&&($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +diff --git a/t/f027.t b/t/f027.t +index a06cb99..1b70ffb 100644 +--- a/t/f027.t ++++ b/t/f027.t +@@ -43,47 +43,47 @@ if ((($year,$mm,$dd) = Decode_Date_US2("_00134_")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_1364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_01364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_001364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_10364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_010364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_0010364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_110364_")) && +-($year==1964) && ($mm==11) && ($dd==3)) ++($year==2064) && ($mm==11) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_0110364_")) && +-($year==1964) && ($mm==11) && ($dd==3)) ++($year==2064) && ($mm==11) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_00110364_")) && +-($year==1964) && ($mm==11) && ($dd==3)) ++($year==2064) && ($mm==11) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -118,7 +118,7 @@ if ((($year,$mm,$dd) = Decode_Date_US2("_0011031964_")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -128,22 +128,22 @@ if ((($year,$mm,$dd) = Decode_Date_US2("_1_3_1964_")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_jan_3_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_Jan_3_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_jAN_3_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_January_3_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -157,32 +157,32 @@ if ((($year,$mm,$dd) = Decode_Date_US2(" January 3rd, 1964 ")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_Jan364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_Jan0364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_Jan00364_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_Jan2264_")) && +-($year==1964) && ($mm==1) && ($dd==22)) ++($year==2064) && ($mm==1) && ($dd==22)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_Jan02264_",0)) && +-($year==1964) && ($mm==1) && ($dd==22)) ++($year==2064) && ($mm==1) && ($dd==22)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_Jan002264_",'')) && +-($year==1964) && ($mm==1) && ($dd==22)) ++($year==2064) && ($mm==1) && ($dd==22)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -225,12 +225,12 @@ unless (($year,$mm,$dd) = Decode_Date_US2("_ja331964_")) + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("x000001x000003x000064x")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_US2("_ja_000003x000064x")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +diff --git a/t/f028.t b/t/f028.t +index aa5218e..fb4ef1c 100644 +--- a/t/f028.t ++++ b/t/f028.t +@@ -43,47 +43,47 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("_00314_")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3164_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_03164_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_003164_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_30164_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_030164_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_0030164_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_110364_")) && +-($year==1964) && ($mm==3) && ($dd==11)) ++($year==2064) && ($mm==3) && ($dd==11)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_0110364_")) && +-($year==1964) && ($mm==3) && ($dd==11)) ++($year==2064) && ($mm==3) && ($dd==11)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_00110364_")) && +-($year==1964) && ($mm==3) && ($dd==11)) ++($year==2064) && ($mm==3) && ($dd==11)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -118,7 +118,7 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("_0011031964_")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -128,22 +128,22 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("_3_1_1964_")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jan_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3_Jan_64_",0)) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3_jAN_64_",1)) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3-JAN-64_",2)) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -158,7 +158,7 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("_3-January-1964_",'')) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-000064_",undef)) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -168,7 +168,7 @@ if ((($year,$mm,$dd) = Decode_Date_EU2("_000003-Jan-001964_")) && + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3_ja_64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -177,22 +177,22 @@ unless (($year,$mm,$dd) = Decode_Date_EU2("_3_j_64_")) + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_3ja64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_03ja64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_003ja64_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("_000003ja000064_")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +@@ -225,12 +225,12 @@ unless (($year,$mm,$dd) = Decode_Date_EU2("_33ja1964_")) + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("x000003x000001x000064x")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + + if ((($year,$mm,$dd) = Decode_Date_EU2("x000003_ja_000064x")) && +-($year==1964) && ($mm==1) && ($dd==3)) ++($year==2064) && ($mm==1) && ($dd==3)) + {print "ok $n\n";} else {print "not ok $n\n";} + $n++; + +-- +2.1.0 + diff --git a/perl-Date-Calc-XS.spec b/perl-Date-Calc-XS.spec index b34fbd9..9707908 100644 --- a/perl-Date-Calc-XS.spec +++ b/perl-Date-Calc-XS.spec @@ -1,11 +1,13 @@ Name: perl-Date-Calc-XS Version: 6.3 -Release: 7%{?dist} +Release: 8%{?dist} Summary: XS wrapper and C library plug-in for Date::Calc License: LGPLv2+ and ( GPL+ or Artistic ) Group: Development/Libraries URL: http://search.cpan.org/dist/Date-Calc-XS/ Source0: http://www.cpan.org/modules/by-module/Date/Date-Calc-XS-%{version}.tar.gz +# rt#101232 +Patch0: Date-Calc-XS-6.3-century.patch # glibc-common contains the iconv binary BuildRequires: glibc-common BuildRequires: perl @@ -35,6 +37,7 @@ Date::Calc::XS is a XS wrapper and C library plug-in for Date::Calc %setup -q -n Date-Calc-XS-%{version} iconv --from=ISO-8859-1 --to=UTF-8 CREDITS.txt >CREDITS.fixed mv CREDITS.fixed CREDITS.txt +%patch0 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" @@ -55,6 +58,9 @@ make test %doc CHANGES.txt README.txt CREDITS.txt license %changelog +* Mon Jan 12 2015 Petr Šabata <contyk@xxxxxxxxxx> - 6.3-8 +- Adapt the test suite for the 2015-2115 era + * Wed Aug 27 2014 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 6.3-7 - Perl 5.20 rebuild
-- 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