diff options
author | David Robillard <d@drobilla.net> | 2022-01-12 16:18:17 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-28 21:57:29 -0500 |
commit | 77eebec72c0507309ce89f8cdaceff4adfd147cf (patch) | |
tree | a0ce99f34ed769e980d094b7df51761ecf9dcf1e /test/test_uri.c | |
parent | d91b3c9ec59976c40742c852d25dccf67b445e61 (diff) | |
download | serd-77eebec72c0507309ce89f8cdaceff4adfd147cf.tar.gz serd-77eebec72c0507309ce89f8cdaceff4adfd147cf.tar.bz2 serd-77eebec72c0507309ce89f8cdaceff4adfd147cf.zip |
Add serd_nodes_file_uri()
Diffstat (limited to 'test/test_uri.c')
-rw-r--r-- | test/test_uri.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_uri.c b/test/test_uri.c index 2b0c9b16..ec102d6f 100644 --- a/test/test_uri.c +++ b/test/test_uri.c @@ -85,12 +85,14 @@ test_file_uri(const char* const hostname, expected_path = path; } - SerdNode* node = - serd_new_file_uri(NULL, SERD_STRING(path), SERD_OPTIONAL_STRING(hostname)); + SerdNodes* const nodes = serd_nodes_new(NULL); + + const SerdNode* node = serd_nodes_file_uri( + nodes, SERD_STRING(path), SERD_OPTIONAL_STRING(hostname)); const char* node_str = serd_node_string(node); char* out_hostname = NULL; - char* out_path = serd_parse_file_uri(NULL, node_str, &out_hostname); + char* const out_path = serd_parse_file_uri(NULL, node_str, &out_hostname); assert(!strcmp(node_str, expected_uri)); assert((hostname && out_hostname) || (!hostname && !out_hostname)); @@ -99,7 +101,7 @@ test_file_uri(const char* const hostname, serd_free(NULL, out_path); serd_free(NULL, out_hostname); - serd_node_free(NULL, node); + serd_nodes_free(nodes); } static void |