1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

uniform path; more methods

This commit is contained in:
tg(x) 2012-01-25 18:05:44 +01:00
parent a210128091
commit 80eb590987
6 changed files with 67 additions and 19 deletions

View file

@ -12,7 +12,11 @@ testUniform (char *str, int ret)
int r = psyc_uniform_parse(uni, str, strlen(str));
PP(("[%.*s] : [%.*s] [%.*s] : [%.*s] [%.*s] / "
"[%.*s] # [%.*s]\n[%.*s]\n[%.*s] [%.*s]\n[%.*s]\n\n",
"[%.*s] # [%.*s]\n"
"[%.*s]\n"
"[%.*s] [%.*s]\n"
"[%.*s]\n"
"[%.*s]\n\n",
(int)PSYC_S2ARG2(uni->scheme),
(int)PSYC_S2ARG2(uni->slashes),
(int)PSYC_S2ARG2(uni->host),
@ -23,6 +27,7 @@ testUniform (char *str, int ret)
(int)PSYC_S2ARG2(uni->entity),
(int)PSYC_S2ARG2(uni->root),
(int)PSYC_S2ARG2(uni->nick),
(int)PSYC_S2ARG2(uni->path),
(int)PSYC_S2ARG2(uni->body)));
free(uni);
@ -37,6 +42,7 @@ int
main ()
{
testUniform("psyc://foo.tld:4404d/@bar#baz", PSYC_SCHEME_PSYC);
testUniform("psyc://foo.tld:4404d/#baz", PSYC_SCHEME_PSYC);
testUniform("psyc://foo:4405/~bar", PSYC_SCHEME_PSYC);
testUniform("psyc://foo:1234", PSYC_SCHEME_PSYC);
testUniform("psyc://foo:1234d", PSYC_SCHEME_PSYC);