MCPcopy Create free account
hub / github.com/acl-dev/acl / test_urlcode

Function test_urlcode

lib_acl/samples/urlcode/main.cpp:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <assert.h>
8
9static void test_urlcode(void)
10{
11 const char *params = "n a m e=�й�&value=����&name2=����&value2=��ң��";
12 char *tmp1, *tmp2;
13
14 printf("params: (%s), len=%d\r\n", params, (int) strlen(params));
15 tmp1 = acl_url_encode(params, NULL);
16 assert(tmp1);
17 printf("encode: (%s), len=%d\r\n", tmp1, (int) strlen(tmp1));
18 tmp2 = acl_url_decode(tmp1, NULL);
19 assert(tmp2);
20 printf("decode: (%s), len=%d\r\n", tmp2, (int) strlen(tmp2));
21
22 acl_myfree(tmp1);
23 acl_myfree(tmp2);
24}
25
26int main(void)
27{

Callers 1

mainFunction · 0.85

Calls 2

acl_url_encodeFunction · 0.85
acl_url_decodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…