#include "llist.h"
+static CURL *easy;
+
static CURLcode unit_setup(void)
{
- return CURLE_OK;
+ int res = CURLE_OK;
+
+ global_init(CURL_GLOBAL_ALL);
+ easy = curl_easy_init();
+ if(!easy)
+ return CURLE_OUT_OF_MEMORY;
+ return res;
}
static void unit_stop(void)
{
-
+ curl_easy_cleanup(easy);
+ curl_global_cleanup();
}
UNITTEST_START
- CURL *easy = curl_easy_init();
int len;
char *esc;
esc = curl_easy_unescape(easy, "%41%41%41%41", -1, &len);
fail_unless(esc == NULL, "negative string length can't work");
- curl_easy_cleanup(easy);
-
UNITTEST_STOP