* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
***************************************************************************/
#include "curlcheck.h"
-CURL *hnd;
+static CURL *hnd;
static CURLcode unit_setup(void)
{
- return CURLE_OK;
+ int res = CURLE_OK;
+
+ global_init(CURL_GLOBAL_ALL);
+ return res;
}
static void unit_stop(void)
{
if(hnd)
curl_easy_cleanup(hnd);
+ curl_global_cleanup();
}
struct test {
hnd = curl_easy_init();
abort_unless(hnd != NULL, "returned NULL!");
- for(i=0; list1[i].in; i++) {
+ for(i = 0; list1[i].in; i++) {
int outlen;
char *out = curl_easy_unescape(hnd,
list1[i].in, list1[i].inlen,
curl_free(out);
}
- for(i=0; list2[i].in; i++) {
+ for(i = 0; list2[i].in; i++) {
int outlen;
char *out = curl_easy_escape(hnd, list2[i].in, list2[i].inlen);
abort_unless(out != NULL, "returned NULL!");