diff options
author | David Robillard <d@drobilla.net> | 2018-12-26 20:08:31 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-19 20:55:40 -0500 |
commit | aec6a5355d36123b4cb100a5b77c9a7e2c3d1d84 (patch) | |
tree | 3dbb86985b32c3eb5cbb7c94562d4558d5f9aa76 /tests | |
parent | 23f09378718cd5c334a5a090744cda4dfbcdb091 (diff) | |
download | serd-aec6a5355d36123b4cb100a5b77c9a7e2c3d1d84.tar.gz serd-aec6a5355d36123b4cb100a5b77c9a7e2c3d1d84.tar.bz2 serd-aec6a5355d36123b4cb100a5b77c9a7e2c3d1d84.zip |
Ensure serd_new_resolved_uri returns an absolute URI or NULL
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 517386ea..a96c3537 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -547,6 +547,7 @@ test_env(void) SerdNode* hello = serd_new_string("hello\""); 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"); @@ -555,7 +556,7 @@ test_env(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)); @@ -616,6 +617,7 @@ test_env(void) serd_node_free(qualified); serd_node_free(foo_c); + serd_node_free(empty); serd_node_free(foo_u); serd_node_free(lit); serd_node_free(b); |