Blob Blame Raw
From e65ad7f563386aa0bf43f6de9e2b3f2dc49e565d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@redhat.com>
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@redhat.com>
---
 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ürttemberg",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