aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib514.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib514.c')
-rw-r--r--tests/libtest/lib514.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/libtest/lib514.c b/tests/libtest/lib514.c
index 06f975f34..6a5733e99 100644
--- a/tests/libtest/lib514.c
+++ b/tests/libtest/lib514.c
@@ -29,7 +29,7 @@ int test(char *URL)
}
/* First set the URL that is about to receive our POST. */
- curl_easy_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_URL, URL);
/* Based on a bug report by Niels van Tongeren on June 29, 2004:
@@ -40,23 +40,25 @@ int test(char *URL)
*/
- curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "moo");
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 3L);
- curl_easy_setopt(curl, CURLOPT_POST, 1L);
+ test_setopt(curl, CURLOPT_POSTFIELDS, "moo");
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, 3L);
+ test_setopt(curl, CURLOPT_POST, 1L);
/* this is where transfer 1 would take place, but skip that and change
options right away instead */
- curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+ test_setopt(curl, CURLOPT_NOBODY, 1L);
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
- curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
+ test_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
+ test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
/* Now, we should be making a fine HEAD request */
/* Perform the request 2, res will get the return code */
res = curl_easy_perform(curl);
+test_cleanup:
+
/* always cleanup */
curl_easy_cleanup(curl);
curl_global_cleanup();