aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib510.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib510.c')
-rw-r--r--tests/libtest/lib510.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c
index e13acf4ec..bb0a11f25 100644
--- a/tests/libtest/lib510.c
+++ b/tests/libtest/lib510.c
@@ -72,39 +72,41 @@ 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
/* 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);
/* enforce chunked transfer by setting the header */
- curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
+ test_setopt(curl, CURLOPT_HTTPHEADER, slist);
#ifdef LIB565
- curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
- curl_easy_setopt(curl, CURLOPT_USERPWD, "foo:bar");
+ test_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
+ test_setopt(curl, CURLOPT_USERPWD, "foo:bar");
#endif
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
+test_cleanup:
+
/* clean up the headers list */
if(slist)
curl_slist_free_all(slist);