| 312 | } |
| 313 | |
| 314 | static 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 | |
| 336 | int main(int argc, char ** argv) |
| 337 | { |
no test coverage detected