diff options
author | David Robillard <d@drobilla.net> | 2012-03-09 23:51:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-09 23:51:52 +0000 |
commit | 90a703bad8e7df5c0b154c17dfb201dc708f6069 (patch) | |
tree | 3f1865e4d511815a246a237bfe13fda9adbc5770 /src/sord_test.c | |
parent | 99082336abd05045e4f224fc2d07776648fbcc46 (diff) | |
download | sord-90a703bad8e7df5c0b154c17dfb201dc708f6069.tar.gz sord-90a703bad8e7df5c0b154c17dfb201dc708f6069.tar.bz2 sord-90a703bad8e7df5c0b154c17dfb201dc708f6069.zip |
Add sord_new_relative_uri().
git-svn-id: http://svn.drobilla.net/sord/trunk@204 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord_test.c')
-rw-r--r-- | src/sord_test.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/sord_test.c b/src/sord_test.c index 15d4ad6..9d5f008 100644 --- a/src/sord_test.c +++ b/src/sord_test.c @@ -437,6 +437,24 @@ main(int argc, char** argv) goto fail; } + // Check relative URI construction + SordNode* reluri = sord_new_relative_uri( + world, USTR("a/b"), USTR("http://example.org/")); + if (strcmp((const char*)sord_node_get_string(reluri), + "http://example.org/a/b")) { + fprintf(stderr, "Fail: Bad relative URI constructed: <%s>\n", + sord_node_get_string(reluri)); + goto fail; + } + SordNode* reluri2 = sord_new_relative_uri( + world, USTR("http://drobilla.net/"), USTR("http://example.org/")); + if (strcmp((const char*)sord_node_get_string(reluri2), + "http://drobilla.net/")) { + fprintf(stderr, "Fail: Bad relative URI constructed: <%s>\n", + sord_node_get_string(reluri)); + goto fail; + } + // Check comparison with NULL sord_node_free(world, uri_id); sord_node_free(world, blank_id); |