aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib544.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib544.c')
-rw-r--r--tests/libtest/lib544.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/libtest/lib544.c b/tests/libtest/lib544.c
index b17e64af2..3229fdad3 100644
--- a/tests/libtest/lib544.c
+++ b/tests/libtest/lib544.c
@@ -40,16 +40,16 @@ 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);
#ifdef LIB545
- curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1);
+ test_setopt(curl, CURLOPT_POSTFIELDSIZE, (long) sizeof teststring - 1);
#endif
- curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring);
+ test_setopt(curl, CURLOPT_COPYPOSTFIELDS, teststring);
- 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 */
/* Update the original data to detect non-copy. */
strcpy(teststring, "FAIL");
@@ -57,6 +57,8 @@ int test(char *URL)
/* Now, this is a POST request with binary 0 embedded in POST data. */
res = curl_easy_perform(curl);
+test_cleanup:
+
/* always cleanup */
curl_easy_cleanup(curl);
curl_global_cleanup();