int main (int argc, char **argv) { const char *datadir = "data/filters"; struct stat st; int i; g_mime_init (); testsuite_init (argc, argv); //verbose = 4; for (i = 1; i < argc; i++) { if (argv[i][0] != '-') { datadir = argv[i]; break; } } if (i < argc && (stat (datadir, &st) == -1 || !S_ISDIR (st.st_mode))) return 0; testsuite_start ("GMimeFilter"); //test_charset_conversion (datadir, "chinese", "utf-8", "big5"); // Note: utf-8 -> big5 drops characters test_charset_conversion (datadir, "cyrillic", "utf-8", "cp1251"); test_charset_conversion (datadir, "cyrillic", "cp1251", "utf-8"); test_charset_conversion (datadir, "cyrillic", "utf-8", "iso-8859-5"); test_charset_conversion (datadir, "cyrillic", "iso-8859-5", "utf-8"); test_charset_conversion (datadir, "cyrillic", "utf-8", "koi8-r"); test_charset_conversion (datadir, "cyrillic", "koi8-r", "utf-8"); test_charset_conversion (datadir, "japanese", "utf-8", "iso-2022-jp"); test_charset_conversion (datadir, "japanese", "iso-2022-jp", "utf-8"); test_charset_conversion (datadir, "japanese", "utf-8", "shift-jis"); test_charset_conversion (datadir, "japanese", "shift-jis", "utf-8"); test_enriched (datadir, "enriched.txt", "enriched.html"); test_gzip (datadir, "lorem-ipsum.txt"); test_gunzip (datadir, "lorem-ipsum.txt"); test_html (datadir, "html-input.txt", "html-output.blockquote.html", GMIME_FILTER_HTML_BLOCKQUOTE_CITATION); test_html (datadir, "html-input.txt", "html-output.mark.html", GMIME_FILTER_HTML_MARK_CITATION); test_html (datadir, "html-input.txt", "html-output.cite.html", GMIME_FILTER_HTML_CITE); test_smtp_data (datadir, "smtp-input.txt", "smtp-output.txt"); test_windows (datadir, "french-fable.cp1252.txt", "iso-8859-1", "windows-cp1252"); testsuite_end (); g_mime_shutdown (); return testsuite_exit (); }
int main() { test_parser(); test_html(); test_escape(); }