Initial commit of visual studio 9 git build superproject.
[git-build-vc9.git] / curl / tests / libtest / lib520.c
blobcdfb3ed4959da1bc0e5352554bc779285464786e
1 /*****************************************************************************
2 * _ _ ____ _
3 * Project ___| | | | _ \| |
4 * / __| | | | |_) | |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * $Id: lib520.c,v 1.4 2008-05-22 21:49:52 danf Exp $
9 */
11 #include "test.h"
13 int test(char *URL)
15 CURLcode res;
16 CURL *curl;
18 if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
19 fprintf(stderr, "curl_global_init() failed\n");
20 return TEST_ERR_MAJOR_BAD;
23 if ((curl = curl_easy_init()) == NULL) {
24 fprintf(stderr, "curl_easy_init() failed\n");
25 curl_global_cleanup();
26 return TEST_ERR_MAJOR_BAD;
29 curl_easy_setopt(curl, CURLOPT_URL, URL);
30 curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
31 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
33 res = curl_easy_perform(curl);
35 curl_easy_cleanup(curl);
36 curl_global_cleanup();
38 return (int)res;