diff options
Diffstat (limited to 'tests/forms-test.c')
-rw-r--r-- | tests/forms-test.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/tests/forms-test.c b/tests/forms-test.c index da71569b..6e6334f4 100644 --- a/tests/forms-test.c +++ b/tests/forms-test.c @@ -5,8 +5,6 @@ #include "test-utils.h" -#ifdef HAVE_CURL - static struct { const char *title, *name; const char *result; @@ -92,6 +90,11 @@ do_hello_tests (gconstpointer uri) { int n; +#ifndef HAVE_CURL + g_test_skip ("/usr/bin/curl is not available"); + return; +#endif + debug_printf (1, "Hello tests (GET, application/x-www-form-urlencoded)\n"); for (n = 0; n < G_N_ELEMENTS (tests); n++) { do_hello_test (n, FALSE, uri); @@ -179,6 +182,11 @@ do_md5_tests (gconstpointer uri) gsize length; GError *error = NULL; +#ifndef HAVE_CURL + g_test_skip ("/usr/bin/curl is not available"); + return; +#endif + debug_printf (1, "\nMD5 tests (POST, multipart/form-data)\n"); if (!g_file_get_contents (MD5_TEST_FILE, &contents, &length, &error)) { @@ -204,6 +212,11 @@ do_form_decode_test (void) const gchar *value; gchar *tmp; +#ifndef HAVE_CURL + g_test_skip ("/usr/bin/curl is not available"); + return; +#endif + debug_printf (1, "\nDecode tests\n"); /* Test that the code handles multiple values with the same key. */ @@ -432,13 +445,3 @@ main (int argc, char **argv) test_cleanup (); return ret; } - -#else /* HAVE_CURL */ - -int -main (int argc, char **argv) -{ - return 77; /* SKIP */ -} - -#endif |