aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-30 20:46:09 +0200
committerDavid Robillard <d@drobilla.net>2018-12-31 11:37:48 -0500
commit39105582259243ad56273befcd5862c31faf402a (patch)
tree465ee1e6818653e814f38b82bbc6f32a926b5c90
parentbddc1fa89cc1126ced849014e49ac631b2c92c8e (diff)
downloadserd-39105582259243ad56273befcd5862c31faf402a.tar.gz
serd-39105582259243ad56273befcd5862c31faf402a.tar.bz2
serd-39105582259243ad56273befcd5862c31faf402a.zip
Add rooted URI resolution test
-rw-r--r--tests/serd_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 1ddb2dd8..81a1ef41 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -346,7 +346,7 @@ main(void)
assert(!serd_new_uri(NULL));
SerdNode* not_a_uri = serd_new_string("hello");
- SerdNode* root = serd_new_uri("http://example.org/a/b/");
+ SerdNode* root = serd_new_uri("http://example.org/a/b/ignored");
SerdNode* base = serd_new_uri("http://example.org/a/b/c/");
SerdNode* nil = serd_new_resolved_uri(NULL, base);
SerdNode* nil2 = serd_new_resolved_uri("", base);
@@ -363,6 +363,8 @@ main(void)
check_rel_uri("http://example.org/a/", base, NULL, "../../") ||
check_rel_uri("http://example.org/a/", base, root,
"http://example.org/a/") ||
+ check_rel_uri("http://example.org/a/b/x", root, root,
+ "x") ||
check_rel_uri("http://example.org/", base, NULL,
"../../../") ||
check_rel_uri("http://drobilla.net/a", base, NULL,