aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test51755
-rw-r--r--tests/libtest/lib517.c55
2 files changed, 110 insertions, 0 deletions
diff --git a/tests/data/test517 b/tests/data/test517
index 7187e8678..070e1faa0 100644
--- a/tests/data/test517
+++ b/tests/data/test517
@@ -50,6 +50,61 @@ nothing
21: 20040911 +0200 => 1094853600
22: Thu, 01-Jan-1970 00:59:59 GMT => 3599
23: Thu, 01-Jan-1970 01:00:00 GMT => 3600
+24: Sat, 15-Apr-17 21:01:22 GMT => 1492290082
+25: Thu, 19-Apr-2007 16:00:00 GMT => 1176998400
+26: Wed, 25 Apr 2007 21:02:13 GMT => 1177534933
+27: Thu, 19/Apr\2007 16:00:00 GMT => 1176998400
+28: Fri, 1 Jan 2010 01:01:50 GMT => 1262307710
+29: Wednesday, 1-Jan-2003 00:00:00 GMT => 1041379200
+30: , 1-Jan-2003 00:00:00 GMT => 1041379200
+31: 1-Jan-2003 00:00:00 GMT => 1041379200
+32: 1-Jan-2003 00:00:00 GMT => 1041379200
+33: Wed,18-Apr-07 22:50:12 GMT => 1176936612
+34: WillyWonka , 18-Apr-07 22:50:12 GMT => -1
+35: WillyWonka , 18-Apr-07 22:50:12 => -1
+36: WillyWonka , 18-apr-07 22:50:12 => -1
+37: Mon, 18-Apr-1977 22:50:13 GMT => 230251813
+38: Mon, 18-Apr-77 22:50:13 GMT => 230251813
+39: "Sat, 15-Apr-17\"21:01:22\"GMT" => 1492290082
+40: Partyday, 18- April-07 22:50:12 => -1
+41: Partyday, 18 - Apri-07 22:50:12 => -1
+42: Wednes, 1-Januar-2003 00:00:00 GMT => -1
+43: Sat, 15-Apr-17 21:01:22 => 1492290082
+44: Sat, 15-Apr-17 21:01:22 GMT-2 => 1492290082
+45: Sat, 15-Apr-17 21:01:22 GMT BLAH => 1492290082
+46: Sat, 15-Apr-17 21:01:22 GMT-0400 => 1492290082
+47: Sat, 15-Apr-17 21:01:22 GMT-0400 (EDT) => 1492290082
+48: Sat, 15-Apr-17 21:01:22 DST => -1
+49: Sat, 15-Apr-17 21:01:22 -0400 => 1492304482
+50: Sat, 15-Apr-17 21:01:22 (hello there) => -1
+51: Sat, 15-Apr-17 21:01:22 11:22:33 => -1
+52: Sat, 15-Apr-17 ::00 21:01:22 => -1
+53: Sat, 15-Apr-17 boink:z 21:01:22 => -1
+54: Sat, 15-Apr-17 91:22:33 21:01:22 => -1
+55: Thu Apr 18 22:50:12 2007 GMT => 1176936612
+56: 22:50:12 Thu Apr 18 2007 GMT => 1176936612
+57: Thu 22:50:12 Apr 18 2007 GMT => 1176936612
+58: Thu Apr 22:50:12 18 2007 GMT => 1176936612
+59: Thu Apr 18 22:50:12 2007 GMT => 1176936612
+60: Thu Apr 18 2007 22:50:12 GMT => 1176936612
+61: Thu Apr 18 2007 GMT 22:50:12 => 1176936612
+62: Sat, 15-Apr-17 21:01:22 GMT => 1492290082
+63: 15-Sat, Apr-17 21:01:22 GMT => 1492290082
+64: 15-Sat, Apr 21:01:22 GMT 17 => 1492290082
+65: 15-Sat, Apr 21:01:22 GMT 2017 => 1492290082
+66: 15 Apr 21:01:22 2017 => 1492290082
+67: 15 17 Apr 21:01:22 => 1492290082
+68: Apr 15 17 21:01:22 => 1492290082
+69: Apr 15 21:01:22 17 => 1492290082
+70: 2017 April 15 21:01:22 => -1
+71: 15 April 2017 21:01:22 => -1
+72: 98 April 17 21:01:22 => -1
+73: Thu, 012-Aug-2008 20:49:07 GMT => 1218574147
+74: Thu, 12-Aug-31841 20:49:07 GMT => 2147483647
+75: Thu, 12-Aug-9999999999 20:49:07 GMT => 2147483647
+76: Thu, 999999999999-Aug-2007 20:49:07 GMT => -1
+77: Thu, 12-Aug-2007 20:61:99999999999 GMT => -1
+78: IAintNoDateFool => -1
</stdout>
# This test case previously testes an overflow case ("2094 Nov 6 =>
diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c
index 86539fb73..5f8971f8c 100644
--- a/tests/libtest/lib517.c
+++ b/tests/libtest/lib517.c
@@ -38,6 +38,61 @@ static const char *dates[]={
"Thu, 01-Jan-1970 00:59:59 GMT",
"Thu, 01-Jan-1970 01:00:00 GMT",
/* "2094 Nov 6", See ../data/test517 for details */
+ "Sat, 15-Apr-17 21:01:22 GMT",
+ "Thu, 19-Apr-2007 16:00:00 GMT",
+ "Wed, 25 Apr 2007 21:02:13 GMT",
+ "Thu, 19/Apr\\2007 16:00:00 GMT",
+ "Fri, 1 Jan 2010 01:01:50 GMT",
+ "Wednesday, 1-Jan-2003 00:00:00 GMT",
+ ", 1-Jan-2003 00:00:00 GMT",
+ " 1-Jan-2003 00:00:00 GMT",
+ "1-Jan-2003 00:00:00 GMT",
+ "Wed,18-Apr-07 22:50:12 GMT",
+ "WillyWonka , 18-Apr-07 22:50:12 GMT",
+ "WillyWonka , 18-Apr-07 22:50:12",
+ "WillyWonka , 18-apr-07 22:50:12",
+ "Mon, 18-Apr-1977 22:50:13 GMT",
+ "Mon, 18-Apr-77 22:50:13 GMT",
+ "\"Sat, 15-Apr-17\\\"21:01:22\\\"GMT\"",
+ "Partyday, 18- April-07 22:50:12",
+ "Partyday, 18 - Apri-07 22:50:12",
+ "Wednes, 1-Januar-2003 00:00:00 GMT",
+ "Sat, 15-Apr-17 21:01:22",
+ "Sat, 15-Apr-17 21:01:22 GMT-2",
+ "Sat, 15-Apr-17 21:01:22 GMT BLAH",
+ "Sat, 15-Apr-17 21:01:22 GMT-0400",
+ "Sat, 15-Apr-17 21:01:22 GMT-0400 (EDT)",
+ "Sat, 15-Apr-17 21:01:22 DST",
+ "Sat, 15-Apr-17 21:01:22 -0400",
+ "Sat, 15-Apr-17 21:01:22 (hello there)",
+ "Sat, 15-Apr-17 21:01:22 11:22:33",
+ "Sat, 15-Apr-17 ::00 21:01:22",
+ "Sat, 15-Apr-17 boink:z 21:01:22",
+ "Sat, 15-Apr-17 91:22:33 21:01:22",
+ "Thu Apr 18 22:50:12 2007 GMT",
+ "22:50:12 Thu Apr 18 2007 GMT",
+ "Thu 22:50:12 Apr 18 2007 GMT",
+ "Thu Apr 22:50:12 18 2007 GMT",
+ "Thu Apr 18 22:50:12 2007 GMT",
+ "Thu Apr 18 2007 22:50:12 GMT",
+ "Thu Apr 18 2007 GMT 22:50:12",
+ "Sat, 15-Apr-17 21:01:22 GMT",
+ "15-Sat, Apr-17 21:01:22 GMT",
+ "15-Sat, Apr 21:01:22 GMT 17",
+ "15-Sat, Apr 21:01:22 GMT 2017",
+ "15 Apr 21:01:22 2017",
+ "15 17 Apr 21:01:22",
+ "Apr 15 17 21:01:22",
+ "Apr 15 21:01:22 17",
+ "2017 April 15 21:01:22",
+ "15 April 2017 21:01:22",
+ "98 April 17 21:01:22",
+ "Thu, 012-Aug-2008 20:49:07 GMT",
+ "Thu, 12-Aug-31841 20:49:07 GMT",
+ "Thu, 12-Aug-9999999999 20:49:07 GMT",
+ "Thu, 999999999999-Aug-2007 20:49:07 GMT",
+ "Thu, 12-Aug-2007 20:61:99999999999 GMT",
+ "IAintNoDateFool",
NULL
};