/* Copyright (c) 2007-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "istream.h"
#include "message-size.h"
#include "message-header-parser.h"
#include "test-common.h"
static const char *test1_msg =
"h1: v1\n"
"h2:\n"
" v2\r\n"
"h3: \r\n"
"\tv3\n"
"\tw3\r\n"
"\n"
" body";
static void
{
bool use_full_value;
use_full_value = hdr_flags != 0;
if ((hdr_flags & MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP) == 0)
else
if ((hdr_flags & MESSAGE_HEADER_PARSER_FLAG_SKIP_INITIAL_LWSP) == 0) {
} else {
}
if ((hdr_flags & MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE) != 0) {
} else if (use_full_value) {
}
if ((hdr_flags & MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE) != 0) {
} else if ((hdr_flags & MESSAGE_HEADER_PARSER_FLAG_DROP_CR) != 0) {
} else if (use_full_value) {
}
if ((hdr_flags & MESSAGE_HEADER_PARSER_FLAG_CLEAN_ONELINE) != 0) {
} else if ((hdr_flags & MESSAGE_HEADER_PARSER_FLAG_DROP_CR) != 0) {
} else if (use_full_value) {
}
}
static void test_message_header_parser(void)
{
test_begin("message header parser");
i_stream_seek(input, 0);
}
test_end();
}
{
if (hdr->middle_len > 0)
}
if (!hdr->no_newline) {
if (hdr->crlf_newline)
}
}
static void test_message_header_parser_partial(void)
{
int ret;
test_begin("message header parser partial");
for (i = 0; i <= max; i++) {
}
test_end();
}
static void
unsigned int buffer_size,
struct message_size *size_r)
{
unsigned int i;
for (i = 1; i <= len; i++) {
}
}
static void test_message_header_parser_long_lines(void)
{
test_begin("message header parser long lines");
for (i = 2; i < len; i++) {
}
for (i = 3; i < len; i++) {
}
test_end();
}
static void test_message_header_parser_extra_cr_in_eoh(void)
{
test_begin("message header parser extra CR in EOH");
test_end();
}
static void test_message_header_parser_no_eoh(void)
{
test_begin("message header parser no EOH");
test_end();
}
int main(void)
{
static void (*const test_functions[])(void) = {
};
return test_run(test_functions);
}