lib517.c
Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                  _   _ ____  _
00003  *  Project                     ___| | | |  _ \| |
00004  *                             / __| | | | |_) | |
00005  *                            | (__| |_| |  _ <| |___
00006  *                             \___|\___/|_| \_\_____|
00007  *
00008  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00009  *
00010  * This software is licensed as described in the file COPYING, which
00011  * you should have received as part of this distribution. The terms
00012  * are also available at https://curl.haxx.se/docs/copyright.html.
00013  *
00014  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00015  * copies of the Software, and permit persons to whom the Software is
00016  * furnished to do so, under the terms of the COPYING file.
00017  *
00018  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00019  * KIND, either express or implied.
00020  *
00021  ***************************************************************************/
00022 #include "test.h"
00023 
00024 #include "memdebug.h"
00025 
00026 static const char * const dates[]={
00027   "Sun, 06 Nov 1994 08:49:37 GMT",
00028   "Sunday, 06-Nov-94 08:49:37 GMT",
00029   "Sun Nov  6 08:49:37 1994",
00030   "06 Nov 1994 08:49:37 GMT",
00031   "06-Nov-94 08:49:37 GMT",
00032   "Nov  6 08:49:37 1994",
00033   "06 Nov 1994 08:49:37",
00034   "06-Nov-94 08:49:37",
00035   "1994 Nov 6 08:49:37",
00036   "GMT 08:49:37 06-Nov-94 Sunday",
00037   "94 6 Nov 08:49:37",
00038   "1994 Nov 6",
00039   "06-Nov-94",
00040   "Sun Nov 6 94",
00041   "1994.Nov.6",
00042   "Sun/Nov/6/94/GMT",
00043   "Sun, 06 Nov 1994 08:49:37 CET",
00044   "06 Nov 1994 08:49:37 EST",
00045   "Sun, 12 Sep 2004 15:05:58 -0700",
00046   "Sat, 11 Sep 2004 21:32:11 +0200",
00047   "20040912 15:05:58 -0700",
00048   "20040911 +0200",
00049   "Thu, 01-Jan-1970 00:59:59 GMT",
00050   "Thu, 01-Jan-1970 01:00:00 GMT",
00051 /*  "2094 Nov 6", See ../data/test517 for details */
00052   "Sat, 15-Apr-17 21:01:22 GMT",
00053   "Thu, 19-Apr-2007 16:00:00 GMT",
00054   "Wed, 25 Apr 2007 21:02:13 GMT",
00055   "Thu, 19/Apr\\2007 16:00:00 GMT",
00056   "Fri, 1 Jan 2010 01:01:50 GMT",
00057   "Wednesday, 1-Jan-2003 00:00:00 GMT",
00058   ", 1-Jan-2003 00:00:00 GMT",
00059   " 1-Jan-2003 00:00:00 GMT",
00060   "1-Jan-2003 00:00:00 GMT",
00061   "Wed,18-Apr-07 22:50:12 GMT",
00062   "WillyWonka  , 18-Apr-07 22:50:12 GMT",
00063   "WillyWonka  , 18-Apr-07 22:50:12",
00064   "WillyWonka  ,  18-apr-07   22:50:12",
00065   "Mon, 18-Apr-1977 22:50:13 GMT",
00066   "Mon, 18-Apr-77 22:50:13 GMT",
00067   "\"Sat, 15-Apr-17\\\"21:01:22\\\"GMT\"",
00068   "Partyday, 18- April-07 22:50:12",
00069   "Partyday, 18 - Apri-07 22:50:12",
00070   "Wednes, 1-Januar-2003 00:00:00 GMT",
00071   "Sat, 15-Apr-17 21:01:22",
00072   "Sat, 15-Apr-17 21:01:22 GMT-2",
00073   "Sat, 15-Apr-17 21:01:22 GMT BLAH",
00074   "Sat, 15-Apr-17 21:01:22 GMT-0400",
00075   "Sat, 15-Apr-17 21:01:22 GMT-0400 (EDT)",
00076   "Sat, 15-Apr-17 21:01:22 DST",
00077   "Sat, 15-Apr-17 21:01:22 -0400",
00078   "Sat, 15-Apr-17 21:01:22 (hello there)",
00079   "Sat, 15-Apr-17 21:01:22 11:22:33",
00080   "Sat, 15-Apr-17 ::00 21:01:22",
00081   "Sat, 15-Apr-17 boink:z 21:01:22",
00082   "Sat, 15-Apr-17 91:22:33 21:01:22",
00083   "Thu Apr 18 22:50:12 2007 GMT",
00084   "22:50:12 Thu Apr 18 2007 GMT",
00085   "Thu 22:50:12 Apr 18 2007 GMT",
00086   "Thu Apr 22:50:12 18 2007 GMT",
00087   "Thu Apr 18 22:50:12 2007 GMT",
00088   "Thu Apr 18 2007 22:50:12 GMT",
00089   "Thu Apr 18 2007 GMT 22:50:12",
00090   "Sat, 15-Apr-17 21:01:22 GMT",
00091   "15-Sat, Apr-17 21:01:22 GMT",
00092   "15-Sat, Apr 21:01:22 GMT 17",
00093   "15-Sat, Apr 21:01:22 GMT 2017",
00094   "15 Apr 21:01:22 2017",
00095   "15 17 Apr 21:01:22",
00096   "Apr 15 17 21:01:22",
00097   "Apr 15 21:01:22 17",
00098   "2017 April 15 21:01:22",
00099   "15 April 2017 21:01:22",
00100   "98 April 17 21:01:22",
00101   "Thu, 012-Aug-2008 20:49:07 GMT",
00102 #if 0
00103   /* leaving out these strings since they differ between 32 and 64 bit
00104      archs and the test suite has no good way to support two different outputs
00105      like that */
00106   "Thu, 12-Aug-31841 20:49:07 GMT",
00107   "Thu, 12-Aug-9999999999 20:49:07 GMT",
00108 #endif
00109   "Thu, 999999999999-Aug-2007 20:49:07 GMT",
00110   "Thu, 12-Aug-2007 20:61:99999999999 GMT",
00111   "IAintNoDateFool",
00112   "Thu Apr 18 22:50 2007 GMT", /* without seconds */
00113   "20110623 12:34:56",
00114   "20110632 12:34:56",
00115   "20110623 56:34:56",
00116   "20111323 12:34:56",
00117   "20110623 12:34:79",
00118   "Wed, 31 Dec 2008 23:59:60 GMT", /* leap second */
00119   "20110623 12:3",
00120   "20110623 1:3",
00121   "20110623 1:30",
00122   "20110623 12:12:3",
00123   "20110623 01:12:3",
00124   "20110623 01:99:30",
00125   NULL
00126 };
00127 
00128 int test(char *URL)
00129 {
00130   int i;
00131 
00132   (void)URL; /* not used */
00133 
00134   for(i=0; dates[i]; i++) {
00135     printf("%d: %s => %ld\n", i, dates[i], (long)curl_getdate(dates[i], NULL));
00136   }
00137 
00138   return 0;
00139 }


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:05