]> granicus.if.org Git - neomutt/commitdiff
test: templates for date functions
authorRichard Russon <rich@flatcap.org>
Sun, 28 Apr 2019 11:37:15 +0000 (12:37 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 30 Apr 2019 09:49:17 +0000 (10:49 +0100)
17 files changed:
.gitignore
test/Makefile.autosetup
test/date/main.c [new file with mode: 0644]
test/date/mutt_date_add_timeout.c [new file with mode: 0644]
test/date/mutt_date_check_month.c [new file with mode: 0644]
test/date/mutt_date_gmtime.c [new file with mode: 0644]
test/date/mutt_date_is_day_name.c [new file with mode: 0644]
test/date/mutt_date_local_tz.c [new file with mode: 0644]
test/date/mutt_date_localtime.c [new file with mode: 0644]
test/date/mutt_date_localtime_format.c [new file with mode: 0644]
test/date/mutt_date_make_date.c [new file with mode: 0644]
test/date/mutt_date_make_imap.c [new file with mode: 0644]
test/date/mutt_date_make_time.c [new file with mode: 0644]
test/date/mutt_date_make_tls.c [new file with mode: 0644]
test/date/mutt_date_normalize_time.c [new file with mode: 0644]
test/date/mutt_date_parse_date.c [new file with mode: 0644]
test/date/mutt_date_parse_imap.c [new file with mode: 0644]

index 7a133f927b2244abcd611ea87717222325b66db9..c2db22fed4ca8000870edb62c7095a858f68ba7d 100644 (file)
@@ -15,6 +15,7 @@ test/base64-test
 test/buffer-test
 test/charset-test
 test/config-test
+test/date-test
 test/group-test
 test/idna-test
 test/neomutt-test
index 86264b503183bce4236cc8f0e09ea7062c5f4ff0..ae61e26c233f70607b499c00622e77d878021b0f 100644 (file)
@@ -95,6 +95,22 @@ CONFIG_OBJS  = test/config/main.o test/config/account.o \
                  test/config/regex.o test/config/set.o test/config/sort.o \
                  test/config/string.o test/config/synonym.o
 
+DATE_OBJS      = test/date/main.o \
+                 test/date/mutt_date_add_timeout.o \
+                 test/date/mutt_date_check_month.o \
+                 test/date/mutt_date_gmtime.o \
+                 test/date/mutt_date_is_day_name.o \
+                 test/date/mutt_date_localtime.o \
+                 test/date/mutt_date_localtime_format.o \
+                 test/date/mutt_date_local_tz.o \
+                 test/date/mutt_date_make_date.o \
+                 test/date/mutt_date_make_imap.o \
+                 test/date/mutt_date_make_time.o \
+                 test/date/mutt_date_make_tls.o \
+                 test/date/mutt_date_normalize_time.o \
+                 test/date/mutt_date_parse_date.o \
+                 test/date/mutt_date_parse_imap.o
+
 GROUP_OBJS     = test/group/main.o \
                  test/group/mutt_grouplist_add_addrlist.o \
                  test/group/mutt_grouplist_add.o \
@@ -199,6 +215,8 @@ TEST_CHARSET = test/charset-test$(EXEEXT)
 
 TEST_CONFIG = test/config-test$(EXEEXT)
 
+TEST_DATE = test/date-test$(EXEEXT)
+
 TEST_GROUP = test/group-test$(EXEEXT)
 
 TEST_IDNA = test/idna-test$(EXEEXT)
@@ -210,12 +228,13 @@ TEST_PATTERN = test/pattern-test$(EXEEXT)
 TEST_STRING = test/string-test$(EXEEXT)
 
 .PHONY: test
-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
+test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_DATE) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
        $(TEST_BINARY)
        $(TEST_ADDRESS)
        $(TEST_BASE64)
        $(TEST_BUFFER)
        $(TEST_CONFIG)
+       $(TEST_DATE)
        $(TEST_GROUP)
        $(TEST_IDNA)
        $(TEST_PATH)
@@ -240,6 +259,9 @@ $(TEST_CHARSET): $(PWD)/test/charset $(CHARSET_OBJS) $(MUTTLIBS)
 $(TEST_CONFIG): $(PWD)/test/config $(CONFIG_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(CONFIG_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
+$(TEST_DATE): $(PWD)/test/date $(DATE_OBJS) $(MUTTLIBS)
+       $(CC) -o $@ $(DATE_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
 $(TEST_GROUP): $(PWD)/test/group $(GROUP_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(GROUP_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
@@ -270,6 +292,9 @@ $(PWD)/test/charset:
 $(PWD)/test/config:
        $(MKDIR_P) $(PWD)/test/config
 
+$(PWD)/test/date:
+       $(MKDIR_P) $(PWD)/test/date
+
 $(PWD)/test/group:
        $(MKDIR_P) $(PWD)/test/group
 
@@ -285,7 +310,7 @@ $(PWD)/test/pattern:
 $(PWD)/test/string:
        $(MKDIR_P) $(PWD)/test/string
 
-all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
+all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(TEST_CHARSET) $(TEST_CONFIG) $(TEST_DATE) $(TEST_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
 
 clean-test:
        $(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \
@@ -293,6 +318,7 @@ clean-test:
              $(TEST_BASE64) $(BASE64_OBJS) $(BASE64_OBJS:.o=.Po) \
              $(TEST_CHARSET) $(CHARSET_OBJS) $(CHARSET_OBJS:.o=.Po) \
              $(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \
+             $(TEST_DATE) $(DATE_OBJS) $(DATE_OBJS:.o=.Po) \
              $(TEST_GROUP) $(GROUP_OBJS) $(GROUP_OBJS:.o=.Po) \
              $(TEST_IDNA) $(IDNA_OBJS) $(IDNA_OBJS:.o=.Po) \
              $(TEST_PATH) $(PATH_OBJS) $(PATH_OBJS:.o=.Po) \
@@ -320,6 +346,9 @@ CHARSET_DEPFILES = $(CHARSET_OBJS:.o=.Po)
 CONFIG_DEPFILES = $(CONFIG_OBJS:.o=.Po)
 -include $(CONFIG_DEPFILES)
 
+DATE_DEPFILES = $(DATE_OBJS:.o=.Po)
+-include $(DATE_DEPFILES)
+
 GROUP_DEPFILES = $(GROUP_OBJS:.o=.Po)
 -include $(GROUP_DEPFILES)
 
diff --git a/test/date/main.c b/test/date/main.c
new file mode 100644 (file)
index 0000000..9baf729
--- /dev/null
@@ -0,0 +1,56 @@
+/**
+ * @file
+ * Test code for date Operations
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "acutest.h"
+
+/******************************************************************************
+ * Add your test cases to this list.
+ *****************************************************************************/
+#define NEOMUTT_TEST_LIST                                                      \
+  NEOMUTT_TEST_ITEM(test_mutt_date_add_timeout)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_date_check_month)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_date_gmtime)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_date_is_day_name)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_date_localtime)                                  \
+  NEOMUTT_TEST_ITEM(test_mutt_date_localtime_format)                           \
+  NEOMUTT_TEST_ITEM(test_mutt_date_local_tz)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_date_make_date)                                  \
+  NEOMUTT_TEST_ITEM(test_mutt_date_make_imap)                                  \
+  NEOMUTT_TEST_ITEM(test_mutt_date_make_time)                                  \
+  NEOMUTT_TEST_ITEM(test_mutt_date_make_tls)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_date_normalize_time)                             \
+  NEOMUTT_TEST_ITEM(test_mutt_date_parse_date)                                 \
+  NEOMUTT_TEST_ITEM(test_mutt_date_parse_imap)
+
+/******************************************************************************
+ * You probably don't need to touch what follows.
+ *****************************************************************************/
+#define NEOMUTT_TEST_ITEM(x) void x(void);
+NEOMUTT_TEST_LIST
+#undef NEOMUTT_TEST_ITEM
+
+TEST_LIST = {
+#define NEOMUTT_TEST_ITEM(x) { #x, x },
+  NEOMUTT_TEST_LIST
+#undef NEOMUTT_TEST_ITEM
+  { 0 }
+};
diff --git a/test/date/mutt_date_add_timeout.c b/test/date/mutt_date_add_timeout.c
new file mode 100644 (file)
index 0000000..e717088
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_add_timeout()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_add_timeout(void)
+{
+  // time_t mutt_date_add_timeout(time_t now, long timeout);
+}
diff --git a/test/date/mutt_date_check_month.c b/test/date/mutt_date_check_month.c
new file mode 100644 (file)
index 0000000..d96140f
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_check_month()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_check_month(void)
+{
+  // int mutt_date_check_month(const char *s);
+}
diff --git a/test/date/mutt_date_gmtime.c b/test/date/mutt_date_gmtime.c
new file mode 100644 (file)
index 0000000..fee9cb0
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_gmtime()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_gmtime(void)
+{
+  // struct tm mutt_date_gmtime(time_t t);
+}
diff --git a/test/date/mutt_date_is_day_name.c b/test/date/mutt_date_is_day_name.c
new file mode 100644 (file)
index 0000000..27a9c75
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_is_day_name()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_is_day_name(void)
+{
+  // bool mutt_date_is_day_name(const char *s);
+}
diff --git a/test/date/mutt_date_local_tz.c b/test/date/mutt_date_local_tz.c
new file mode 100644 (file)
index 0000000..ed00456
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_local_tz()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_local_tz(void)
+{
+  // time_t mutt_date_local_tz(time_t t);
+}
diff --git a/test/date/mutt_date_localtime.c b/test/date/mutt_date_localtime.c
new file mode 100644 (file)
index 0000000..4b3527e
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_localtime()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_localtime(void)
+{
+  // struct tm mutt_date_localtime(time_t t);
+}
diff --git a/test/date/mutt_date_localtime_format.c b/test/date/mutt_date_localtime_format.c
new file mode 100644 (file)
index 0000000..1b163b3
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_localtime_format()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_localtime_format(void)
+{
+  // size_t mutt_date_localtime_format(char *buf, size_t buflen, char *format, time_t t);
+}
diff --git a/test/date/mutt_date_make_date.c b/test/date/mutt_date_make_date.c
new file mode 100644 (file)
index 0000000..17dfb66
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_make_date()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_make_date(void)
+{
+  // char *mutt_date_make_date(char *buf, size_t buflen);
+}
diff --git a/test/date/mutt_date_make_imap.c b/test/date/mutt_date_make_imap.c
new file mode 100644 (file)
index 0000000..da4a57b
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_make_imap()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_make_imap(void)
+{
+  // int mutt_date_make_imap(char *buf, size_t buflen, time_t timestamp);
+}
diff --git a/test/date/mutt_date_make_time.c b/test/date/mutt_date_make_time.c
new file mode 100644 (file)
index 0000000..49f574e
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_make_time()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_make_time(void)
+{
+  // time_t mutt_date_make_time(struct tm *t, bool local);
+}
diff --git a/test/date/mutt_date_make_tls.c b/test/date/mutt_date_make_tls.c
new file mode 100644 (file)
index 0000000..8d3953d
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_make_tls()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_make_tls(void)
+{
+  // int mutt_date_make_tls(char *buf, size_t buflen, time_t timestamp);
+}
diff --git a/test/date/mutt_date_normalize_time.c b/test/date/mutt_date_normalize_time.c
new file mode 100644 (file)
index 0000000..1bae1cf
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_normalize_time()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_normalize_time(void)
+{
+  // void mutt_date_normalize_time(struct tm *tm);
+}
diff --git a/test/date/mutt_date_parse_date.c b/test/date/mutt_date_parse_date.c
new file mode 100644 (file)
index 0000000..7f941b5
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_parse_date()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_parse_date(void)
+{
+  // time_t mutt_date_parse_date(const char *s, struct Tz *tz_out);
+}
diff --git a/test/date/mutt_date_parse_imap.c b/test/date/mutt_date_parse_imap.c
new file mode 100644 (file)
index 0000000..99d989a
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_date_parse_imap()
+ *
+ * @authors
+ * Copyright (C) 2019 Richard Russon <rich@flatcap.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#define TEST_NO_MAIN
+#include "acutest.h"
+#include "config.h"
+#include "mutt/mutt.h"
+
+void test_mutt_date_parse_imap(void)
+{
+  // time_t mutt_date_parse_imap(const char *s);
+}