test-imap-utf7.c revision 5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294
/* Copyright (c) 2008-2013 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "unichar.h"
#include "imap-utf7.h"
#include "test-common.h"
static void test_imap_utf7(void)
{
static const char *to_utf7[] = {
"&&x&&", "&-&-x&-&-",
"tietäjä", "tiet&AOQ-j&AOQ-",
"p\xe4\xe4", NULL,
};
static const char *invalid_utf7[] = {
"&Jjo!",
"&U,BTFw-&ZeVnLIqe-",
};
const char *orig_src;
unsigned int i, j;
str_truncate(dest, 0);
else {
}
if (!success) {
FALSE);
all_success = FALSE;
str_truncate(dest, 0);
FALSE);
all_success = FALSE;
}
}
}
if (all_success)
for (i = 1; i <= 10; i++) {
str_truncate(src, 0);
str_truncate(dest, 0);
for (j = 0; j < i; j++) {
if (j % 3 == 0)
if (j % 5 == 0)
}
str_truncate(src, 0);
else
if (!success)
goto end;
}
}
end:
for (i = 0; invalid_utf7[i] != NULL; i++) {
str_truncate(dest, 0);
FALSE);
all_success = FALSE;
}
}
if (all_success)
}
int main(void)
{
static void (*test_functions[])(void) = {
};
return test_run(test_functions);
}