aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-26 20:08:31 -0500
committerDavid Robillard <d@drobilla.net>2019-04-13 19:15:32 +0200
commit62983c9a77d8aa0df72f6efbc30eedc901870d97 (patch)
tree7e93d3aee463fcecd539779624ca53e289b107d7 /tests
parent696b558616bec2d2259bf901d2d94728e0cb0b74 (diff)
downloadserd-62983c9a77d8aa0df72f6efbc30eedc901870d97.tar.gz
serd-62983c9a77d8aa0df72f6efbc30eedc901870d97.tar.bz2
serd-62983c9a77d8aa0df72f6efbc30eedc901870d97.zip
Ensure serd_new_resolved_uri returns an absolute URI or NULL
Diffstat (limited to 'tests')
-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 513344a3..6486e0ba 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -411,6 +411,7 @@ main(void)
SerdNode* eg = serd_new_uri("http://example.org/");
SerdNode* foo_u = serd_new_uri("http://example.org/foo");
+ SerdNode* empty = serd_new_uri("");
SerdNode* foo_c = serd_new_curie("eg.2:foo");
SerdNode* b = serd_new_curie("invalid");
SerdNode* pre = serd_new_curie("eg.2");
@@ -419,7 +420,7 @@ main(void)
assert(!serd_env_get_base_uri(env));
assert(serd_env_set_base_uri(env, NULL));
- assert(!serd_env_get_base_uri(env));
+ assert(serd_env_set_base_uri(env, empty));
assert(serd_env_set_base_uri(env, hello));
assert(!serd_env_get_base_uri(env));
@@ -474,6 +475,7 @@ main(void)
serd_node_free(qualified);
serd_node_free(foo_c);
+ serd_node_free(empty);
serd_node_free(foo_u);
serd_node_free(b);
serd_node_free(pre);