diff options
author | David Robillard <d@drobilla.net> | 2014-05-05 15:38:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-05-05 15:38:33 +0000 |
commit | 6ac6d7448aa0a976e7347daf8b48d6e56216af85 (patch) | |
tree | 0f51f140d4f04ef160cc36ab91a5dbd3a5111940 /test | |
parent | 88b95c5a431dfb2762309073184406d1eaa987bf (diff) | |
download | lilv-6ac6d7448aa0a976e7347daf8b48d6e56216af85.tar.gz lilv-6ac6d7448aa0a976e7347daf8b48d6e56216af85.tar.bz2 lilv-6ac6d7448aa0a976e7347daf8b48d6e56216af85.zip |
Fix use of lv2info -m and -p options to write plugin data.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5401 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test')
-rw-r--r-- | test/lilv_test.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lilv_test.c b/test/lilv_test.c index 998ffb0..102ffc6 100644 --- a/test/lilv_test.c +++ b/test/lilv_test.c @@ -259,6 +259,16 @@ test_value(void) TEST_ASSERT(lilv_node_as_int(ival) == 42); TEST_ASSERT(fabs(lilv_node_as_float(fval) - 1.6180) < FLT_EPSILON); + LilvNode* loc_abs = lilv_new_file_uri(world, NULL, "/foo/bar"); + LilvNode* loc_rel = lilv_new_file_uri(world, NULL, "foo"); + LilvNode* host_abs = lilv_new_file_uri(world, "host", "/foo/bar"); + LilvNode* host_rel = lilv_new_file_uri(world, "host", "foo"); + + TEST_ASSERT(!strcmp(lilv_node_as_uri(loc_abs), "file:///foo/bar")); + TEST_ASSERT(!strncmp(lilv_node_as_uri(loc_rel), "file:///", 8)); + TEST_ASSERT(!strcmp(lilv_node_as_uri(host_abs), "file://host/foo/bar")); + TEST_ASSERT(!strncmp(lilv_node_as_uri(host_rel), "file://host/", 12)); + char* tok = lilv_node_get_turtle_token(uval); TEST_ASSERT(!strcmp(tok, "<http://example.org>")); free(tok); |