diff options
author | David Robillard <d@drobilla.net> | 2020-11-12 20:52:23 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-13 01:15:05 +0100 |
commit | dddc46b13fa0379784c6369c656e37933ac623dc (patch) | |
tree | 31d09d623c11f49500b42e07566d066ab988dc59 /test/test_env.c | |
parent | febc0828f271aa06681081217ee3ab2649dbf13a (diff) | |
download | serd-dddc46b13fa0379784c6369c656e37933ac623dc.tar.gz serd-dddc46b13fa0379784c6369c656e37933ac623dc.tar.bz2 serd-dddc46b13fa0379784c6369c656e37933ac623dc.zip |
Allow setting the base URI of an Env to NULL
Diffstat (limited to 'test/test_env.c')
-rw-r--r-- | test/test_env.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_env.c b/test/test_env.c index 1ed7552e..36b8f6c3 100644 --- a/test/test_env.c +++ b/test/test_env.c @@ -43,7 +43,7 @@ test_env(void) SerdEnv* env = serd_env_new(NULL); serd_env_set_prefix_from_strings(env, USTR("eg.2"), USTR("http://example.org/")); - assert(serd_env_set_base_uri(env, NULL)); + assert(!serd_env_set_base_uri(env, NULL)); assert(serd_env_set_base_uri(env, &SERD_NODE_NULL)); assert(serd_node_equals(serd_env_get_base_uri(env, NULL), &SERD_NODE_NULL)); @@ -84,6 +84,11 @@ test_env(void) SerdNode prefix_name; assert(!serd_env_qualify(env, &shorter_uri, &prefix_name, &suffix)); + assert(!serd_env_set_base_uri(env, &u)); + assert(serd_node_equals(serd_env_get_base_uri(env, NULL), &u)); + assert(!serd_env_set_base_uri(env, NULL)); + assert(!serd_env_get_base_uri(env, NULL)->buf); + serd_env_free(env); } |