diff options
author | David Robillard <d@drobilla.net> | 2018-10-28 16:57:18 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-25 22:12:47 +0100 |
commit | 27249b15a561221ae693a6f26e817eb65d19404d (patch) | |
tree | 73ec84c27bd9192d56663cec4d143139857eb98a /tests | |
parent | 505209a2ff35c2b880cc64712932fd4d11aeaf8d (diff) | |
download | serd-27249b15a561221ae693a6f26e817eb65d19404d.tar.gz serd-27249b15a561221ae693a6f26e817eb65d19404d.tar.bz2 serd-27249b15a561221ae693a6f26e817eb65d19404d.zip |
Ensure serd_new_resolved_uri returns an absolute URI or NULL
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index 29f48cef..5ce94905 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -476,6 +476,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"); @@ -490,6 +491,10 @@ main(void) FAIL("Successfully set NULL base URI\n"); } + if (!serd_env_set_base_uri(env, empty)) { + FAIL("Successfully set empty base URI\n"); + } + if (!serd_env_set_base_uri(env, hello)) { FAILF("Set base URI to %s\n", serd_node_get_string(hello)); } |