]> granicus.if.org Git - neomutt/commitdiff
test: templates for charset 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)
23 files changed:
.gitignore
test/Makefile.autosetup
test/charset/main.c [new file with mode: 0644]
test/charset/mutt_ch_canonical_charset.c [new file with mode: 0644]
test/charset/mutt_ch_charset_lookup.c [new file with mode: 0644]
test/charset/mutt_ch_check.c [new file with mode: 0644]
test/charset/mutt_ch_check_charset.c [new file with mode: 0644]
test/charset/mutt_ch_choose.c [new file with mode: 0644]
test/charset/mutt_ch_chscmp.c [new file with mode: 0644]
test/charset/mutt_ch_convert_nonmime_string.c [new file with mode: 0644]
test/charset/mutt_ch_convert_string.c [new file with mode: 0644]
test/charset/mutt_ch_fgetconv.c [new file with mode: 0644]
test/charset/mutt_ch_fgetconv_close.c [new file with mode: 0644]
test/charset/mutt_ch_fgetconv_open.c [new file with mode: 0644]
test/charset/mutt_ch_fgetconvs.c [new file with mode: 0644]
test/charset/mutt_ch_get_default_charset.c [new file with mode: 0644]
test/charset/mutt_ch_get_langinfo_charset.c [new file with mode: 0644]
test/charset/mutt_ch_iconv.c [new file with mode: 0644]
test/charset/mutt_ch_iconv_lookup.c [new file with mode: 0644]
test/charset/mutt_ch_iconv_open.c [new file with mode: 0644]
test/charset/mutt_ch_lookup_add.c [new file with mode: 0644]
test/charset/mutt_ch_lookup_remove.c [new file with mode: 0644]
test/charset/mutt_ch_set_charset.c [new file with mode: 0644]

index aeb3d316e765a5043e2cdd1a3a634d700cc4d746..7a133f927b2244abcd611ea87717222325b66db9 100644 (file)
@@ -13,6 +13,7 @@ pgpewrap
 test/address-test
 test/base64-test
 test/buffer-test
+test/charset-test
 test/config-test
 test/group-test
 test/idna-test
index 3584a0bc6c9f357b64053d1ed783fc6b30309b14..86264b503183bce4236cc8f0e09ea7062c5f4ff0 100644 (file)
@@ -64,6 +64,28 @@ BUFFER_OBJS  = test/buffer/main.o \
                  test/buffer/mutt_buffer_strcpy.o \
                  test/buffer/mutt_buffer_strcpy_n.o
 
+CHARSET_OBJS   = test/charset/main.o \
+                 test/charset/mutt_ch_canonical_charset.o \
+                 test/charset/mutt_ch_charset_lookup.o \
+                 test/charset/mutt_ch_check.o \
+                 test/charset/mutt_ch_check_charset.o \
+                 test/charset/mutt_ch_choose.o \
+                 test/charset/mutt_ch_chscmp.o \
+                 test/charset/mutt_ch_convert_nonmime_string.o \
+                 test/charset/mutt_ch_convert_string.o \
+                 test/charset/mutt_ch_fgetconv.o \
+                 test/charset/mutt_ch_fgetconv_close.o \
+                 test/charset/mutt_ch_fgetconv_open.o \
+                 test/charset/mutt_ch_fgetconvs.o \
+                 test/charset/mutt_ch_get_default_charset.o \
+                 test/charset/mutt_ch_get_langinfo_charset.o \
+                 test/charset/mutt_ch_iconv.o \
+                 test/charset/mutt_ch_iconv_lookup.o \
+                 test/charset/mutt_ch_iconv_open.o \
+                 test/charset/mutt_ch_lookup_add.o \
+                 test/charset/mutt_ch_lookup_remove.o \
+                 test/charset/mutt_ch_set_charset.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 \
@@ -173,6 +195,8 @@ TEST_BASE64 = test/base64-test$(EXEEXT)
 
 TEST_BUFFER = test/buffer-test$(EXEEXT)
 
+TEST_CHARSET = test/charset-test$(EXEEXT)
+
 TEST_CONFIG = test/config-test$(EXEEXT)
 
 TEST_GROUP = test/group-test$(EXEEXT)
@@ -186,7 +210,7 @@ TEST_PATTERN = test/pattern-test$(EXEEXT)
 TEST_STRING = test/string-test$(EXEEXT)
 
 .PHONY: test
-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(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_GROUP) $(TEST_IDNA) $(TEST_PATH) $(TEST_PATTERN) $(TEST_STRING)
        $(TEST_BINARY)
        $(TEST_ADDRESS)
        $(TEST_BASE64)
@@ -210,6 +234,9 @@ $(TEST_BASE64): $(PWD)/test/base64 $(BASE64_OBJS) $(MUTTLIBS)
 $(TEST_BUFFER): $(PWD)/test/buffer $(BUFFER_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(BUFFER_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
+$(TEST_CHARSET): $(PWD)/test/charset $(CHARSET_OBJS) $(MUTTLIBS)
+       $(CC) -o $@ $(CHARSET_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
+
 $(TEST_CONFIG): $(PWD)/test/config $(CONFIG_OBJS) $(MUTTLIBS)
        $(CC) -o $@ $(CONFIG_OBJS) $(MUTTLIBS) $(LDFLAGS) $(LIBS)
 
@@ -237,6 +264,9 @@ $(PWD)/test/base64:
 $(PWD)/test/buffer:
        $(MKDIR_P) $(PWD)/test/buffer
 
+$(PWD)/test/charset:
+       $(MKDIR_P) $(PWD)/test/charset
+
 $(PWD)/test/config:
        $(MKDIR_P) $(PWD)/test/config
 
@@ -255,12 +285,13 @@ $(PWD)/test/pattern:
 $(PWD)/test/string:
        $(MKDIR_P) $(PWD)/test/string
 
-all-test: $(TEST_BINARY) $(TEST_ADDRESS) $(TEST_BASE64) $(TEST_BUFFER) $(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_GROUP) $(TEST_IDNA) $(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_BASE64) $(BASE64_OBJS) $(BASE64_OBJS:.o=.Po) \
+             $(TEST_CHARSET) $(CHARSET_OBJS) $(CHARSET_OBJS:.o=.Po) \
              $(TEST_CONFIG) $(CONFIG_OBJS) $(CONFIG_OBJS:.o=.Po) \
              $(TEST_GROUP) $(GROUP_OBJS) $(GROUP_OBJS:.o=.Po) \
              $(TEST_IDNA) $(IDNA_OBJS) $(IDNA_OBJS:.o=.Po) \
@@ -283,6 +314,9 @@ BASE64_DEPFILES = $(BASE64_OBJS:.o=.Po)
 BUFFER_DEPFILES = $(BUFFER_OBJS:.o=.Po)
 -include $(BUFFER_DEPFILES)
 
+CHARSET_DEPFILES = $(CHARSET_OBJS:.o=.Po)
+-include $(CHARSET_DEPFILES)
+
 CONFIG_DEPFILES = $(CONFIG_OBJS:.o=.Po)
 -include $(CONFIG_DEPFILES)
 
diff --git a/test/charset/main.c b/test/charset/main.c
new file mode 100644 (file)
index 0000000..c42194c
--- /dev/null
@@ -0,0 +1,62 @@
+/**
+ * @file
+ * Test code for charset 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_ch_canonical_charset)                            \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_charset_lookup)                               \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_check)                                        \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_check_charset)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_choose)                                       \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_chscmp)                                       \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_convert_nonmime_string)                       \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_convert_string)                               \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_fgetconv)                                     \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_fgetconv_close)                               \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_fgetconv_open)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_fgetconvs)                                    \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_get_default_charset)                          \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_get_langinfo_charset)                         \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_iconv)                                        \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_iconv_lookup)                                 \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_iconv_open)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_lookup_add)                                   \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_lookup_remove)                                \
+  NEOMUTT_TEST_ITEM(test_mutt_ch_set_charset)
+
+/******************************************************************************
+ * 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/charset/mutt_ch_canonical_charset.c b/test/charset/mutt_ch_canonical_charset.c
new file mode 100644 (file)
index 0000000..d818fef
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_canonical_charset()
+ *
+ * @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_ch_canonical_charset(void)
+{
+  // void mutt_ch_canonical_charset(char *buf, size_t buflen, const char *name);
+}
diff --git a/test/charset/mutt_ch_charset_lookup.c b/test/charset/mutt_ch_charset_lookup.c
new file mode 100644 (file)
index 0000000..169d04e
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_charset_lookup()
+ *
+ * @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_ch_charset_lookup(void)
+{
+  // const char *mutt_ch_charset_lookup(const char *chs);
+}
diff --git a/test/charset/mutt_ch_check.c b/test/charset/mutt_ch_check.c
new file mode 100644 (file)
index 0000000..2c5b9c2
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_check()
+ *
+ * @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_ch_check(void)
+{
+  // int mutt_ch_check(const char *s, size_t slen, const char *from, const char *to);
+}
diff --git a/test/charset/mutt_ch_check_charset.c b/test/charset/mutt_ch_check_charset.c
new file mode 100644 (file)
index 0000000..7882352
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_check_charset()
+ *
+ * @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_ch_check_charset(void)
+{
+  // bool mutt_ch_check_charset(const char *cs, bool strict);
+}
diff --git a/test/charset/mutt_ch_choose.c b/test/charset/mutt_ch_choose.c
new file mode 100644 (file)
index 0000000..2e4dac3
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_choose()
+ *
+ * @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_ch_choose(void)
+{
+  // char *mutt_ch_choose(const char *fromcode, const char *charsets, const char *u, size_t ulen, char **d, size_t *dlen);
+}
diff --git a/test/charset/mutt_ch_chscmp.c b/test/charset/mutt_ch_chscmp.c
new file mode 100644 (file)
index 0000000..6f9a571
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_chscmp()
+ *
+ * @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_ch_chscmp(void)
+{
+  // bool mutt_ch_chscmp(const char *cs1, const char *cs2);
+}
diff --git a/test/charset/mutt_ch_convert_nonmime_string.c b/test/charset/mutt_ch_convert_nonmime_string.c
new file mode 100644 (file)
index 0000000..8a4d502
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_convert_nonmime_string()
+ *
+ * @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_ch_convert_nonmime_string(void)
+{
+  // int mutt_ch_convert_nonmime_string(char **ps);
+}
diff --git a/test/charset/mutt_ch_convert_string.c b/test/charset/mutt_ch_convert_string.c
new file mode 100644 (file)
index 0000000..1b1a9df
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_convert_string()
+ *
+ * @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_ch_convert_string(void)
+{
+  // int mutt_ch_convert_string(char **ps, const char *from, const char *to, int flags);
+}
diff --git a/test/charset/mutt_ch_fgetconv.c b/test/charset/mutt_ch_fgetconv.c
new file mode 100644 (file)
index 0000000..437b1ed
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_fgetconv()
+ *
+ * @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_ch_fgetconv(void)
+{
+  // int mutt_ch_fgetconv(struct FgetConv *fc);
+}
diff --git a/test/charset/mutt_ch_fgetconv_close.c b/test/charset/mutt_ch_fgetconv_close.c
new file mode 100644 (file)
index 0000000..caca33b
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_fgetconv_close()
+ *
+ * @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_ch_fgetconv_close(void)
+{
+  // void mutt_ch_fgetconv_close(struct FgetConv **fc);
+}
diff --git a/test/charset/mutt_ch_fgetconv_open.c b/test/charset/mutt_ch_fgetconv_open.c
new file mode 100644 (file)
index 0000000..714393b
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_fgetconv_open()
+ *
+ * @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_ch_fgetconv_open(void)
+{
+  // struct FgetConv *mutt_ch_fgetconv_open(FILE *fp, const char *from, const char *to, int flags);
+}
diff --git a/test/charset/mutt_ch_fgetconvs.c b/test/charset/mutt_ch_fgetconvs.c
new file mode 100644 (file)
index 0000000..879113b
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_fgetconvs()
+ *
+ * @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_ch_fgetconvs(void)
+{
+  // char *mutt_ch_fgetconvs(char *buf, size_t buflen, struct FgetConv *fc);
+}
diff --git a/test/charset/mutt_ch_get_default_charset.c b/test/charset/mutt_ch_get_default_charset.c
new file mode 100644 (file)
index 0000000..a4fca43
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_get_default_charset()
+ *
+ * @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_ch_get_default_charset(void)
+{
+  // char *mutt_ch_get_default_charset(void);
+}
diff --git a/test/charset/mutt_ch_get_langinfo_charset.c b/test/charset/mutt_ch_get_langinfo_charset.c
new file mode 100644 (file)
index 0000000..1d0e336
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_get_langinfo_charset()
+ *
+ * @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_ch_get_langinfo_charset(void)
+{
+  // char *mutt_ch_get_langinfo_charset(void);
+}
diff --git a/test/charset/mutt_ch_iconv.c b/test/charset/mutt_ch_iconv.c
new file mode 100644 (file)
index 0000000..1f7fda7
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_iconv()
+ *
+ * @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_ch_iconv(void)
+{
+  // size_t mutt_ch_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft, const char **inrepls, const char *outrepl, int *iconverrno);
+}
diff --git a/test/charset/mutt_ch_iconv_lookup.c b/test/charset/mutt_ch_iconv_lookup.c
new file mode 100644 (file)
index 0000000..fcc26f6
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_iconv_lookup()
+ *
+ * @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_ch_iconv_lookup(void)
+{
+  // const char *mutt_ch_iconv_lookup(const char *chs);
+}
diff --git a/test/charset/mutt_ch_iconv_open.c b/test/charset/mutt_ch_iconv_open.c
new file mode 100644 (file)
index 0000000..9a245ce
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_iconv_open()
+ *
+ * @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_ch_iconv_open(void)
+{
+  // iconv_t mutt_ch_iconv_open(const char *tocode, const char *fromcode, int flags);
+}
diff --git a/test/charset/mutt_ch_lookup_add.c b/test/charset/mutt_ch_lookup_add.c
new file mode 100644 (file)
index 0000000..7767275
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_lookup_add()
+ *
+ * @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_ch_lookup_add(void)
+{
+  // bool mutt_ch_lookup_add(enum LookupType type, const char *pat, const char *replace, struct Buffer *err);
+}
diff --git a/test/charset/mutt_ch_lookup_remove.c b/test/charset/mutt_ch_lookup_remove.c
new file mode 100644 (file)
index 0000000..aff96da
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_lookup_remove()
+ *
+ * @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_ch_lookup_remove(void)
+{
+  // void mutt_ch_lookup_remove(void);
+}
diff --git a/test/charset/mutt_ch_set_charset.c b/test/charset/mutt_ch_set_charset.c
new file mode 100644 (file)
index 0000000..26bb053
--- /dev/null
@@ -0,0 +1,31 @@
+/**
+ * @file
+ * Test code for mutt_ch_set_charset()
+ *
+ * @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_ch_set_charset(void)
+{
+  // void mutt_ch_set_charset(const char *charset);
+}