Git init
[external/curl.git] / tests / libtest / lib543.c
1 /*****************************************************************************
2  *                                  _   _ ____  _
3  *  Project                     ___| | | |  _ \| |
4  *                             / __| | | | |_) | |
5  *                            | (__| |_| |  _ <| |___
6  *                             \___|\___/|_| \_\_____|
7  *
8  *
9  * Based on Alex Fishman's bug report on September 30, 2007
10  */
11
12 #include "test.h"
13
14 #include "memdebug.h"
15
16 int test(char *URL)
17 {
18   unsigned char a[] = {0x9c, 0x26, 0x4b, 0x3d, 0x49, 0x4, 0xa1, 0x1,
19                        0xe0, 0xd8, 0x7c,  0x20, 0xb7, 0xef, 0x53, 0x29, 0xfa,
20                        0x1d, 0x57, 0xe1};
21
22   CURL *easy;
23   int asize;
24   char *s;
25   (void)URL;
26
27   if ((easy = curl_easy_init()) == NULL) {
28     fprintf(stderr, "curl_easy_init() failed\n");
29     return TEST_ERR_MAJOR_BAD;
30   }
31
32   asize = (int)sizeof(a);
33
34   s = curl_easy_escape(easy, (char*)a, asize);
35
36   printf("%s\n", s);
37
38   curl_free(s);
39   curl_easy_cleanup(easy);
40
41   return 0;
42 }