diff options
author | David Robillard <d@drobilla.net> | 2018-09-30 20:46:09 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 19:15:32 +0200 |
commit | aeeb845013778542afe838c172e1e1bb800c68eb (patch) | |
tree | 97bd0942de6c518d085895c086ae3af7bdf7446a /tests | |
parent | d7bde35652211e3f3cd4d155e7778e6691a42358 (diff) | |
download | serd-aeeb845013778542afe838c172e1e1bb800c68eb.tar.gz serd-aeeb845013778542afe838c172e1e1bb800c68eb.tar.bz2 serd-aeeb845013778542afe838c172e1e1bb800c68eb.zip |
Add rooted URI resolution test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index c5a91eef..7de0025d 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, |