test-message-date.c revision baf3e87e186453fda13bd21f7cbcb2efc8492e8b
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd/* Copyright (c) 2007-2016 Dovecot authors, see the included COPYING file */
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowenstatic void test_message_date_parse(void)
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd static const char *input[] = {
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd "Thu, 01 Jan 1970 01:59:59 +0200",
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen "Fri, 13 Dec 1901 20:45:53 +0000",
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd "Sun, 07 Feb 2106 06:28:15 +0000",
3f08db06526d6901aa08c110b5bc7dde6bc39905nd "Wed, 07 Nov 2007 01:07:20 +0200",
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd "Wed, 07 Nov 2007 01:07:20",
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd "Thu, 01 Jan 1970 02:00:00 +0200",
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd "Tue, 19 Jan 2038 03:14:07 +0000",
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd "Tue, 19 Jan 2038"
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd unsigned int i;
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd ret = message_date_parse((const unsigned char *)input[i],
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd test_out(t_strdup_printf("message_date_parse(%d)", i), success);
8574d86b9ec3be36b7f54ed0547a0ee5d60dbd6bnd static void (*const test_functions[])(void) = {