int main (int argc, char **argv) { SoupAuthDomain *auth_domain; test_init (argc, argv, NULL); server = soup_test_server_new (TRUE); 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)); auth_domain = soup_auth_domain_basic_new ( SOUP_AUTH_DOMAIN_REALM, "misc-test", SOUP_AUTH_DOMAIN_ADD_PATH, "/auth", SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, auth_callback, NULL); soup_server_add_auth_domain (server, auth_domain); g_object_unref (auth_domain); do_host_test (); do_callback_unref_test (); do_msg_reuse_test (); do_star_test (); do_early_abort_test (); do_content_length_framing_test (); do_accept_language_test (); do_persistent_connection_timeout_test (); soup_uri_free (base_uri); soup_test_server_quit_unref (server); test_cleanup (); return errors != 0; }
int main (int argc, char **argv) { SoupAuthDomain *auth_domain; test_init (argc, argv, NULL); server = soup_test_server_new (TRUE); soup_server_add_handler (server, NULL, server_callback, "http", NULL); base_uri = soup_uri_new ("http://127.0.0.1/"); soup_uri_set_port (base_uri, soup_server_get_port (server)); auth_domain = soup_auth_domain_basic_new ( SOUP_AUTH_DOMAIN_REALM, "misc-test", SOUP_AUTH_DOMAIN_ADD_PATH, "/auth", SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, auth_callback, NULL); soup_server_add_auth_domain (server, auth_domain); g_object_unref (auth_domain); ssl_server = soup_test_server_new_ssl (TRUE); soup_server_add_handler (ssl_server, NULL, server_callback, "https", NULL); ssl_base_uri = soup_uri_new ("https://127.0.0.1/"); soup_uri_set_port (ssl_base_uri, soup_server_get_port (ssl_server)); do_host_test (); do_callback_unref_test (); do_callback_unref_req_test (); do_msg_reuse_test (); do_star_test (); do_early_abort_test (); do_early_abort_req_test (); do_accept_language_test (); do_cancel_while_reading_test (); do_cancel_while_reading_req_test (); do_aliases_test (); do_dot_dot_test (); do_ipv6_test (); do_idle_on_dispose_test (); do_pause_abort_test (); soup_uri_free (base_uri); soup_uri_free (ssl_base_uri); soup_test_server_quit_unref (server); soup_test_server_quit_unref (ssl_server); test_cleanup (); return errors != 0; }