]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-mail: test-message-header-parser - Validate header value
authorAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 4 Nov 2020 13:10:04 +0000 (15:10 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 11 Nov 2020 11:53:37 +0000 (11:53 +0000)
src/lib-mail/test-message-header-parser.c

index 563cb3b9e67ba3f51dffa7baa03c376d5a225744..7362f6c630394853b552d2db7871ac9ffba60a63 100644 (file)
@@ -278,6 +278,9 @@ static void test_message_header_parser_no_eoh(void)
        parser = message_parse_header_init(input, NULL, 0);
        test_assert(message_parse_header_next(parser, &hdr) > 0 &&
                    strcmp(hdr->name, "a") == 0);
+       test_assert_strcmp(message_header_strdup(pool_datastack_create(),
+                                                hdr->value, hdr->value_len),
+                          "b");
        test_assert(message_parse_header_next(parser, &hdr) < 0);
        message_parse_header_deinit(&parser);
        test_assert(input->stream_errno == 0);