aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib515.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib515.c')
-rw-r--r--tests/libtest/lib515.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/libtest/lib515.c b/tests/libtest/lib515.c
index c85f2bed1..56ee68ead 100644
--- a/tests/libtest/lib515.c
+++ b/tests/libtest/lib515.c
@@ -29,15 +29,17 @@ int test(char *URL)
}
/* First set the URL that is about to receive our POST. */
- curl_easy_setopt(curl, CURLOPT_URL, URL);
- curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L);
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
- curl_easy_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_POSTFIELDS, NULL);
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, 0L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L); /* show verbose for debug */
+ test_setopt(curl, CURLOPT_HEADER, 1L); /* include header */
/* Now, we should be making a zero byte POST request */
res = curl_easy_perform(curl);
+test_cleanup:
+
/* always cleanup */
curl_easy_cleanup(curl);
curl_global_cleanup();