summaryrefslogtreecommitdiff
path: root/test/uri-tests.c
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2006-01-01 17:10:57 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2006-01-01 17:10:57 +0000
commit976e620bf6fcb5e529fb666b14fc15ce999c5d38 (patch)
treedf4f198f859834488914ad905833ec5aea1a39d2 /test/uri-tests.c
parent5944c98e21f73caaa5f4d7226bf7d4f71c4cdd60 (diff)
downloadneon-976e620bf6fcb5e529fb666b14fc15ce999c5d38.tar.gz
* src/ne_uri.c (ne_uri_parse): Empty string is a valid URI-reference,
so allow it. (ne_uri_unparse): Handle URIs with undefined authority. * test/uri-tests.c (parse): Add test case for former. (unparse): Add test case for latter. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@811 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'test/uri-tests.c')
-rw-r--r--test/uri-tests.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/uri-tests.c b/test/uri-tests.c
index f69c1c0..f10d28b 100644
--- a/test/uri-tests.c
+++ b/test/uri-tests.c
@@ -284,6 +284,7 @@ static int parse(void)
{ "//[::1]/foo", NULL, "[::1]", 0, "/foo", NULL, NULL, NULL },
{ "/bar", NULL, NULL, 0, "/bar", NULL, NULL, NULL }, /* path-absolute */
{ "foo/bar", NULL, NULL, 0, "foo/bar", NULL, NULL, NULL }, /* path-noscheme */
+ { "", NULL, NULL, 0, "", NULL, NULL, NULL }, /* path-empty */
{ NULL }
};
@@ -312,7 +313,6 @@ static int parse(void)
static int failparse(void)
{
static const char *uris[] = {
- "",
"http://[::1/",
"http://[::1]f:80/",
"http://[::1]]:80/",
@@ -344,6 +344,7 @@ static int unparse(void)
"http://a/b?c#d",
"http://a/b?c",
"http://a/b#d",
+ "mailto:foo@bar.com",
NULL
};
int n;