diff options
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test.c b/test.c index c1cdd72..ff6b137 100644 --- a/test.c +++ b/test.c @@ -1,4 +1,5 @@ #include <stdio.h> +#include <stdlib.h> #include "yuri.h" @@ -22,6 +23,7 @@ int main(int argc, char *argv[]) { struct uri *u; + char *p; if (argc < 2) { fprintf(stderr, "Usage %s url\n", argv[0]); @@ -33,6 +35,11 @@ main(int argc, char *argv[]) if (uri_normalize(u) == -1) return 1; _print_uri(u); + p = uri_encode(u); + if (p == NULL) + return 1; + printf("%s\n", p); + free(p); uri_free(u); return 0; } |