From: Aki Tuomi Date: Wed, 4 Nov 2020 10:34:57 +0000 (+0200) Subject: lib-mail: test-message-header-decode - Use libcharset X-Git-Tag: 2.3.14.rc1~348 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fcf197ebcc02255d9067ac09241d292d50dff1bb;p=thirdparty%2Fdovecot%2Fcore.git lib-mail: test-message-header-decode - Use libcharset Otherwise we can only test utf-8 --- diff --git a/src/lib-mail/Makefile.am b/src/lib-mail/Makefile.am index 1b59a13c76..03216a7632 100644 --- a/src/lib-mail/Makefile.am +++ b/src/lib-mail/Makefile.am @@ -117,6 +117,7 @@ noinst_PROGRAMS = $(test_programs) test_libs = \ $(noinst_LTLIBRARIES) \ + ../lib-charset/libcharset.la \ ../lib-test/libtest.la \ ../lib/liblib.la diff --git a/src/lib-mail/test-message-header-decode.c b/src/lib-mail/test-message-header-decode.c index 7934c7bf61..f08193b78d 100644 --- a/src/lib-mail/test-message-header-decode.c +++ b/src/lib-mail/test-message-header-decode.c @@ -9,22 +9,6 @@ #include "message-header-decode.h" #include "test-common.h" - -bool charset_is_utf8(const char *charset ATTR_UNUSED) { return TRUE; } - -int charset_to_utf8_begin(const char *charset ATTR_UNUSED, - normalizer_func_t *normalizer ATTR_UNUSED, - struct charset_translation **t_r ATTR_UNUSED) { return 0; } -void charset_to_utf8_end(struct charset_translation **t ATTR_UNUSED) {} - -enum charset_result -charset_to_utf8(struct charset_translation *t ATTR_UNUSED, - const unsigned char *src, size_t *src_size, buffer_t *dest) -{ - buffer_append(dest, src, *src_size); - return CHARSET_RET_OK; -} - static void test_message_header_decode(void) { static const char *data[] = {