]> granicus.if.org Git - neomutt/commitdiff
test: templates for address functions
authorRichard Russon <rich@flatcap.org>
Sat, 27 Apr 2019 15:53:33 +0000 (16:53 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 27 Apr 2019 21:48:41 +0000 (22:48 +0100)
30 files changed:
.gitignore
Makefile.autosetup
test/Makefile.autosetup
test/address/main.c [new file with mode: 0644]
test/address/mutt_addr_append.c [new file with mode: 0644]
test/address/mutt_addr_cat.c [new file with mode: 0644]
test/address/mutt_addr_cmp.c [new file with mode: 0644]
test/address/mutt_addr_cmp_strict.c [new file with mode: 0644]
test/address/mutt_addr_copy.c [new file with mode: 0644]
test/address/mutt_addr_copy_list.c [new file with mode: 0644]
test/address/mutt_addr_for_display.c [new file with mode: 0644]
test/address/mutt_addr_free.c [new file with mode: 0644]
test/address/mutt_addr_has_recips.c [new file with mode: 0644]
test/address/mutt_addr_is_intl.c [new file with mode: 0644]
test/address/mutt_addr_is_local.c [new file with mode: 0644]
test/address/mutt_addr_mbox_to_udomain.c [new file with mode: 0644]
test/address/mutt_addr_new.c [new file with mode: 0644]
test/address/mutt_addr_parse_list.c [new file with mode: 0644]
test/address/mutt_addr_parse_list2.c [new file with mode: 0644]
test/address/mutt_addr_qualify.c [new file with mode: 0644]
test/address/mutt_addr_remove_from_list.c [new file with mode: 0644]
test/address/mutt_addr_remove_xrefs.c [new file with mode: 0644]
test/address/mutt_addr_search.c [new file with mode: 0644]
test/address/mutt_addr_set_intl.c [new file with mode: 0644]
test/address/mutt_addr_set_local.c [new file with mode: 0644]
test/address/mutt_addr_valid_msgid.c [new file with mode: 0644]
test/address/mutt_addr_write.c [new file with mode: 0644]
test/address/mutt_addr_write_single.c [new file with mode: 0644]
test/address/mutt_addrlist_to_intl.c [new file with mode: 0644]
test/address/mutt_addrlist_to_local.c [new file with mode: 0644]

index bd974c33a346c67a9c188a4dc3471c790ec28ec8..189108cc46d5b02f0f961238186e6f13cc3c2b1a 100644 (file)
@@ -10,6 +10,7 @@ Makefile
 doc/makedoc
 neomutt
 pgpewrap
+test/address-test
 test/config-test
 test/neomutt-test
 test/path-test
index 3561678656a50c8a56050d573fc8e5245ba01b07..580e02c3592d6416c290b4fc1a0189f998fd36f1 100644 (file)
@@ -446,7 +446,7 @@ distclean: clean
 # coverage testing
 coverage: all test
        $(RM) lcov
-       lcov -t "test" -o lcov.info -c -d mutt -d config
+       lcov -t "test" -o lcov.info -c -d address -d config -d mutt
        -genhtml -o lcov lcov.info -f
        lcov -l lcov.info
 
index 98a40bb57374d000d46ebc7a58b9581a38ebd106..58f1ce7b6811458b20b253c0d56bfbf9e0feaba2 100644 (file)
@@ -7,6 +7,34 @@ TEST_OBJS   = test/main.o \
              test/url.o \
              test/file.o
 
+ADDRESS_OBJS   = test/address/main.o \
+                 test/address/mutt_addr_append.o \
+                 test/address/mutt_addr_cat.o \
+                 test/address/mutt_addr_cmp.o \
+                 test/address/mutt_addr_cmp_strict.o \
+                 test/address/mutt_addr_copy.o \
+                 test/address/mutt_addr_copy_list.o \
+                 test/address/mutt_addr_for_display.o \
+                 test/address/mutt_addr_free.o \
+                 test/address/mutt_addr_has_recips.o \
+                 test/address/mutt_addr_is_intl.o \
+                 test/address/mutt_addr_is_local.o \
+                 test/address/mutt_addrlist_to_intl.o \
+                 test/address/mutt_addrlist_to_local.o \
+                 test/address/mutt_addr_mbox_to_udomain.o \
+                 test/address/mutt_addr_new.o \
+                 test/address/mutt_addr_parse_list2.o \
+                 test/address/mutt_addr_parse_list.o \
+                 test/address/mutt_addr_qualify.o \
+                 test/address/mutt_addr_remove_from_list.o \
+                 test/address/mutt_addr_remove_xrefs.o \
+                 test/address/mutt_addr_search.o \
+                 test/address/mutt_addr_set_intl.o \
+                 test/address/mutt_addr_set_local.o \
+                 test/address/mutt_addr_valid_msgid.o \
+                 test/address/mutt_addr_write.o \
+                 test/address/mutt_addr_write_single.o
+
 CONFIG_OBJS    = test/config/main.o test/config/account.o \
                  test/config/address.o test/config/bool.o \
                  test/config/command.o test/config/common.o test/config/dump.o \
@@ -91,6 +119,8 @@ CFLAGS       += -I$(SRCDIR)/test
 
 TEST_BINARY = test/neomutt-test$(EXEEXT)
 
+TEST_ADDRESS = test/address-test$(EXEEXT)
+
 TEST_CONFIG = test/config-test$(EXEEXT)
 
 TEST_PATH = test/path-test$(EXEEXT)
@@ -100,8 +130,9 @@ TEST_PATTERN = test/pattern-test$(EXEEXT)
 TEST_STRING = test/string-test$(EXEEXT)
 
 .PHONY: test
-test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
+test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_CONFIG) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
        $(TEST_BINARY)
+       $(TEST_ADDRESS)
        $(TEST_CONFIG)
        $(TEST_PATH)
        $(TEST_PATTERN)
@@ -110,6 +141,9 @@ test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
 $(TEST_BINARY): $(TEST_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(TEST_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
+$(TEST_ADDRESS): $(PWD)/test/address $(ADDRESS_OBJS) $(MUTTLIBS)
+       $(CC) -o $@ $(ADDRESS_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
 $(TEST_CONFIG): $(PWD)/test/config $(CONFIG_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(CONFIG_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
@@ -122,6 +156,9 @@ $(TEST_PATTERN): $(PWD)/test/pattern $(PATTERN_OBJS) $(MUTTLIBS)
 $(TEST_STRING): $(PWD)/test/string $(STRING_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(STRING_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
+$(PWD)/test/address:
+       $(MKDIR_P) $(PWD)/test/address
+
 $(PWD)/test/config:
        $(MKDIR_P) $(PWD)/test/config
 
@@ -134,10 +171,11 @@ $(PWD)/test/pattern:
 $(PWD)/test/string:
        $(MKDIR_P) $(PWD)/test/string
 
-all-test: $(TEST_BINARY) $(TEST_CONFIG) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
+all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_CONFIG) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
 
 clean-test:
        $(RM) $(TEST_BINARY) $(TEST_OBJS) $(TEST_OBJS:.o=.Po) \
+             $(TEST_ADDRESS) $(ADDRESS_OBJS) $(ADDRESS_OBJS:.o=.Po) \
              $(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \
              $(TEST_PATH) $(PATH_OBJS) $(PATH_OBJS:.o=.Po) \
              $(TEST_PATTERN) $(PATTERN_OBJS) $(PATTERN_OBJS:.o=.Po) \
@@ -149,6 +187,9 @@ uninstall-test:
 TEST_DEPFILES = $(TEST_OBJS:.o=.Po)
 -include $(TEST_DEPFILES)
 
+ADDRESS_DEPFILES = $(ADDRESS_OBJS:.o=.Po)
+-include $(ADDRESS_DEPFILES)
+
 CONFIG_DEPFILES = $(CONFIG_OBJS:.o=.Po)
 -include $(CONFIG_DEPFILES)
 
diff --git a/test/address/main.c b/test/address/main.c
new file mode 100644 (file)
index 0000000..3e2f505
--- /dev/null
@@ -0,0 +1,68 @@
+/**
+ * @file
+ * Test code for Path 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_addr_append)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_cat)                                        \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_cmp)                                        \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_cmp_strict)                                 \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_copy)                                       \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_copy_list)                                  \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_for_display)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_free)                                       \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_has_recips)                                 \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_is_intl)                                    \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_is_local)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_mbox_to_udomain)                            \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_new)                                        \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_parse_list)                                 \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_parse_list2)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_qualify)                                    \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_remove_from_list)                           \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_remove_xrefs)                               \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_search)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_set_intl)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_set_local)                                  \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_valid_msgid)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_write)                                      \
+  NEOMUTT_TEST_ITEM(test_mutt_addr_write_single)                               \
+  NEOMUTT_TEST_ITEM(test_mutt_addrlist_to_intl)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_addrlist_to_local)
+
+/******************************************************************************
+ * 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/address/mutt_addr_append.c b/test/address/mutt_addr_append.c
new file mode 100644 (file)
index 0000000..2257667
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_append()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_append(void)
+{
+  // struct Address *mutt_addr_append(struct Address **a, struct Address *b, bool prune);
+}
diff --git a/test/address/mutt_addr_cat.c b/test/address/mutt_addr_cat.c
new file mode 100644 (file)
index 0000000..acae11c
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_cat()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_cat(void)
+{
+  // void mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *specials);
+}
diff --git a/test/address/mutt_addr_cmp.c b/test/address/mutt_addr_cmp.c
new file mode 100644 (file)
index 0000000..432ff94
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_cmp()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_cmp(void)
+{
+  // bool mutt_addr_cmp(struct Address *a, struct Address *b);
+}
diff --git a/test/address/mutt_addr_cmp_strict.c b/test/address/mutt_addr_cmp_strict.c
new file mode 100644 (file)
index 0000000..e88e728
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_cmp_strict()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_cmp_strict(void)
+{
+  // bool mutt_addr_cmp_strict(const struct Address *a, const struct Address *b);
+}
diff --git a/test/address/mutt_addr_copy.c b/test/address/mutt_addr_copy.c
new file mode 100644 (file)
index 0000000..9f60018
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_copy()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_copy(void)
+{
+  // struct Address *mutt_addr_copy(struct Address *addr);
+}
diff --git a/test/address/mutt_addr_copy_list.c b/test/address/mutt_addr_copy_list.c
new file mode 100644 (file)
index 0000000..bf549b9
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_copy_list()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_copy_list(void)
+{
+  // struct Address *mutt_addr_copy_list(struct Address *addr, bool prune);
+}
diff --git a/test/address/mutt_addr_for_display.c b/test/address/mutt_addr_for_display.c
new file mode 100644 (file)
index 0000000..ca26eb5
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_for_display()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_for_display(void)
+{
+  // const char * mutt_addr_for_display(struct Address *a);
+}
diff --git a/test/address/mutt_addr_free.c b/test/address/mutt_addr_free.c
new file mode 100644 (file)
index 0000000..a73e628
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_free()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_free(void)
+{
+  // void mutt_addr_free(struct Address **p);
+}
diff --git a/test/address/mutt_addr_has_recips.c b/test/address/mutt_addr_has_recips.c
new file mode 100644 (file)
index 0000000..9582f32
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_has_recips()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_has_recips(void)
+{
+  // int mutt_addr_has_recips(struct Address *a);
+}
diff --git a/test/address/mutt_addr_is_intl.c b/test/address/mutt_addr_is_intl.c
new file mode 100644 (file)
index 0000000..d7530e5
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_is_intl()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_is_intl(void)
+{
+  // bool mutt_addr_is_intl(struct Address *a);
+}
diff --git a/test/address/mutt_addr_is_local.c b/test/address/mutt_addr_is_local.c
new file mode 100644 (file)
index 0000000..c9f13f1
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_is_local()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_is_local(void)
+{
+  // bool mutt_addr_is_local(struct Address *a);
+}
diff --git a/test/address/mutt_addr_mbox_to_udomain.c b/test/address/mutt_addr_mbox_to_udomain.c
new file mode 100644 (file)
index 0000000..623d725
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_mbox_to_udomain()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_mbox_to_udomain(void)
+{
+  // int mutt_addr_mbox_to_udomain(const char *mbox, char **user, char **domain);
+}
diff --git a/test/address/mutt_addr_new.c b/test/address/mutt_addr_new.c
new file mode 100644 (file)
index 0000000..bd96ae5
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_new()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_new(void)
+{
+  // struct Address *mutt_addr_new(void);
+}
diff --git a/test/address/mutt_addr_parse_list.c b/test/address/mutt_addr_parse_list.c
new file mode 100644 (file)
index 0000000..e47e405
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_parse_list()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_parse_list(void)
+{
+  // struct Address *mutt_addr_parse_list(struct Address *top, const char *s);
+}
diff --git a/test/address/mutt_addr_parse_list2.c b/test/address/mutt_addr_parse_list2.c
new file mode 100644 (file)
index 0000000..73cff79
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_parse_list2()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_parse_list2(void)
+{
+  // struct Address *mutt_addr_parse_list2(struct Address *p, const char *s);
+}
diff --git a/test/address/mutt_addr_qualify.c b/test/address/mutt_addr_qualify.c
new file mode 100644 (file)
index 0000000..4b32cb4
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_qualify()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_qualify(void)
+{
+  // void mutt_addr_qualify(struct Address *addr, const char *host);
+}
diff --git a/test/address/mutt_addr_remove_from_list.c b/test/address/mutt_addr_remove_from_list.c
new file mode 100644 (file)
index 0000000..1cff659
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_remove_from_list()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_remove_from_list(void)
+{
+  // int mutt_addr_remove_from_list(struct Address **a, const char *mailbox);
+}
diff --git a/test/address/mutt_addr_remove_xrefs.c b/test/address/mutt_addr_remove_xrefs.c
new file mode 100644 (file)
index 0000000..f2f177b
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_remove_xrefs()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_remove_xrefs(void)
+{
+  // struct Address *mutt_addr_remove_xrefs(struct Address *a, struct Address *b);
+}
diff --git a/test/address/mutt_addr_search.c b/test/address/mutt_addr_search.c
new file mode 100644 (file)
index 0000000..cb6c297
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_search()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_search(void)
+{
+  // bool mutt_addr_search(struct Address *a, struct Address *lst);
+}
diff --git a/test/address/mutt_addr_set_intl.c b/test/address/mutt_addr_set_intl.c
new file mode 100644 (file)
index 0000000..7254102
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_set_intl()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_set_intl(void)
+{
+  // void mutt_addr_set_intl(struct Address *a, char *intl_mailbox);
+}
diff --git a/test/address/mutt_addr_set_local.c b/test/address/mutt_addr_set_local.c
new file mode 100644 (file)
index 0000000..9377aa6
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_set_local()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_set_local(void)
+{
+  // void mutt_addr_set_local(struct Address *a, char *local_mailbox);
+}
diff --git a/test/address/mutt_addr_valid_msgid.c b/test/address/mutt_addr_valid_msgid.c
new file mode 100644 (file)
index 0000000..ad420b8
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_valid_msgid()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_valid_msgid(void)
+{
+  // bool mutt_addr_valid_msgid(const char *msgid);
+}
diff --git a/test/address/mutt_addr_write.c b/test/address/mutt_addr_write.c
new file mode 100644 (file)
index 0000000..d685358
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_write()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_write(void)
+{
+  // size_t mutt_addr_write(char *buf, size_t buflen, struct Address *addr, bool display);
+}
diff --git a/test/address/mutt_addr_write_single.c b/test/address/mutt_addr_write_single.c
new file mode 100644 (file)
index 0000000..c7dc659
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addr_write_single()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addr_write_single(void)
+{
+  // void mutt_addr_write_single(char *buf, size_t buflen, struct Address *addr, bool display);
+}
diff --git a/test/address/mutt_addrlist_to_intl.c b/test/address/mutt_addrlist_to_intl.c
new file mode 100644 (file)
index 0000000..ff7acf5
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addrlist_to_intl()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addrlist_to_intl(void)
+{
+  // int mutt_addrlist_to_intl(struct Address *a, char **err);
+}
diff --git a/test/address/mutt_addrlist_to_local.c b/test/address/mutt_addrlist_to_local.c
new file mode 100644 (file)
index 0000000..57a99a8
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * Test code for mutt_addrlist_to_local()
+ *
+ * @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"
+#include "address/lib.h"
+
+void test_mutt_addrlist_to_local(void)
+{
+  // int mutt_addrlist_to_local(struct Address *a);
+}