int main (int argc, char **argv) { SoupServer *server; test_init (argc, argv, NULL); buffer = g_malloc (READ_BUFFER_SIZE); server = soup_test_server_new (FALSE); soup_server_add_handler (server, NULL, server_callback, NULL, NULL); base_uri = soup_uri_new ("http://127.0.0.1"); soup_uri_set_port (base_uri, soup_server_get_port (server)); base_uri_string = soup_uri_to_string (base_uri, FALSE); /* FIXME: I had to raise the number of connections allowed here, otherwise I * was hitting the limit, which indicates some connections are not dying. */ session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, "use-thread-context", TRUE, "max-conns", 20, "max-conns-per-host", 20, NULL); soup_session_add_feature_by_type (session, SOUP_TYPE_CONTENT_SNIFFER); test_multipart (1, 1, NO_MULTIPART); test_multipart (1, 1, SYNC_MULTIPART); test_multipart (1, 1, ASYNC_MULTIPART); test_multipart (1, 1, ASYNC_MULTIPART_SMALL_READS); soup_uri_free (base_uri); g_free (base_uri_string); g_free (buffer); soup_test_session_abort_unref (session); soup_test_server_quit_unref (server); test_cleanup (); return errors != 0; }
int main (int argc, char *const *argv) { unsigned int errorCount = 0; errorCount += test_multipart_splits (); errorCount += test_multipart_garbage (); errorCount += test_urlencoding (); errorCount += test_multipart (); errorCount += test_nested_multipart (); errorCount += test_empty_value (); if (errorCount != 0) fprintf (stderr, "Error (code: %u)\n", errorCount); return errorCount != 0; /* 0 == pass */ }
int main (int argc, char **argv) { test_multipart (); exit (Errors); }