return 0;
}
-void test_mime(void) {
+static void test_mime(void) {
char *t, *n, *v;
struct vector parts[1];
struct kvp *k;
const char *s, *cs, *enc;
hash *h;
- fprintf(stderr, "test_mime\n");
-
t = 0;
k = 0;
insist(!mime_content_type("text/plain", &t, &k));
"Now's the time for all folk to come to the aid of their country.");
#define check_base64(encoded, decoded) do { \
- check_string(mime_base64(encoded, 0), decoded); \
+ size_t ns; \
+ check_string(mime_base64(encoded, &ns), decoded); \
+ insist(ns == (sizeof decoded) - 1); \
check_string(mime_to_base64((const uint8_t *)decoded, \
(sizeof decoded) - 1), \
encoded); \
check_string(enc, "quoted-printable");
}
+TEST(mime);
+
/*
Local Variables:
c-basic-offset:2