aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib508.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib508.c')
-rw-r--r--tests/libtest/lib508.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/libtest/lib508.c b/tests/libtest/lib508.c
index 6de7e7bcd..f392e414d 100644
--- a/tests/libtest/lib508.c
+++ b/tests/libtest/lib508.c
@@ -58,34 +58,36 @@ 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);
/* Now specify we want to POST data */
- curl_easy_setopt(curl, CURLOPT_POST, 1L);
+ test_setopt(curl, CURLOPT_POST, 1L);
#ifdef CURL_DOES_CONVERSIONS
/* Convert the POST data to ASCII */
- curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
+ test_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
#endif
/* Set the expected POST size */
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)pooh.sizeleft);
/* we want to use our own read function */
- curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+ test_setopt(curl, CURLOPT_READFUNCTION, read_callback);
/* pointer to pass to our read function */
- curl_easy_setopt(curl, CURLOPT_INFILE, &pooh);
+ test_setopt(curl, CURLOPT_INFILE, &pooh);
/* get verbose debug output please */
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
/* include headers in the output */
- curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+test_cleanup:
+
/* always cleanup */
curl_easy_cleanup(curl);
curl_global_cleanup();