test-quoted-printable.c revision 1a1fcdbe27a8cee9a4c453a6b2f625a5be572a32
/* Copyright (c) 2007-2009 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "str.h"
#include "quoted-printable.h"
#include "test-common.h"
static void test_quoted_printable_decode(void)
{
const char *data[] = {
"foo \r\nbar=", "foo\r\nbar",
"foo =\nbar", "foo bar",
"foo =\r\nbar", "foo bar",
"foo \nbar=", "foo\r\nbar",
"=0A=0D ", "\n\r",
"foo_bar", "foo_bar",
"foo=", "foo",
"foo=A", "foo",
"foo=Ax", "foo=Ax",
"foo=Ax=xy", "foo=Ax=xy"
};
test_begin("quoted printable decode");
end++;
else
}
buffer_set_used_size(buf, 0);
}
test_end();
}
static void test_quoted_printable_q_decode(void)
{
const char *data[] = {
"=0A=0D ", "\n\r ",
"__foo__bar__", " foo bar ",
"foo=", "foo=",
"foo=A", "foo=A",
"foo=Ax", "foo=Ax",
"foo=Ax=xy", "foo=Ax=xy"
};
unsigned int i;
test_begin("quoted printable q decode");
buf);
buffer_set_used_size(buf, 0);
}
test_end();
}
int main(void)
{
static void (*test_functions[])(void) = {
};
return test_run(test_functions);
}