MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / testMUTF7

Function testMUTF7

unittest/unittest.cpp:314–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314static void testMUTF7(void)
315{
316 int failure = 0;
317 int success = 0;
318 const char * mutf7string = "~peter/mail/&U,BTFw-/&ZeVnLIqe-";
319 IMAPNamespace * ns = IMAPNamespace::namespaceWithPrefix(MCSTR(""), '/');
320 Array * result = ns->componentsFromPath(String::stringWithUTF8Characters(mutf7string));
321 if (strcmp(MCUTF8(result), "[~peter,mail,台北,日本語]") != 0) {
322 failure ++;
323 }
324 else {
325 success ++;
326 }
327 if (failure > 0) {
328 printf("testMUTF7 ok: %i succeeded, %i failed\n", success, failure);
329 global_failure ++;
330 return;
331 }
332 printf("testMUTF7 ok: %i succeeded\n", success);
333 global_success ++;
334}
335
336int main(int argc, char ** argv)
337{

Callers 1

mainFunction · 0.85

Calls 1

componentsFromPathMethod · 0.45

Tested by

no test coverage detected