aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serd_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-08 18:53:50 +0000
committerDavid Robillard <d@drobilla.net>2012-03-08 18:53:50 +0000
commit44177f8c18af89540b90a1cfa38ddda84fc6f747 (patch)
tree7d4bb7db119982a32ffefe56042b37c65fb2837c /tests/serd_test.c
parent362fa1151017494b629d4db81487671557bef0a3 (diff)
downloadserd-44177f8c18af89540b90a1cfa38ddda84fc6f747.tar.gz
serd-44177f8c18af89540b90a1cfa38ddda84fc6f747.tar.bz2
serd-44177f8c18af89540b90a1cfa38ddda84fc6f747.zip
Add escape parameter to serd_node_new_file_uri().
git-svn-id: http://svn.drobilla.net/serd/trunk@333 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r--tests/serd_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 50e761a5..3a4584ed 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -255,7 +255,7 @@ main()
// Test serd_node_new_file_uri and serd_file_uri_parse
SerdURI furi;
const uint8_t* path_str = USTR("C:/My 100%");
- SerdNode file_node = serd_node_new_file_uri(path_str, 0, &furi);
+ SerdNode file_node = serd_node_new_file_uri(path_str, 0, &furi, true);
uint8_t* hostname = NULL;
uint8_t* out_path = serd_file_uri_parse(file_node.buf, &hostname);
if (strcmp((const char*)file_node.buf, "file:///C:/My%20100%%")) {
@@ -270,7 +270,7 @@ main()
serd_node_free(&file_node);
path_str = USTR("C:\\Pointless Space");
- file_node = serd_node_new_file_uri(path_str, USTR("pwned"), 0);
+ file_node = serd_node_new_file_uri(path_str, USTR("pwned"), 0, true);
hostname = NULL;
out_path = serd_file_uri_parse(file_node.buf, &hostname);
if (strcmp((const char*)file_node.buf, "file://pwned/C:/Pointless%20Space")) {
@@ -286,7 +286,7 @@ main()
serd_node_free(&file_node);
path_str = USTR("/foo/bar");
- file_node = serd_node_new_file_uri(path_str, 0, 0);
+ file_node = serd_node_new_file_uri(path_str, 0, 0, true);
hostname = NULL;
out_path = serd_file_uri_parse(file_node.buf, &hostname);
if (strcmp((const char*)file_node.buf, "file:///foo/bar")) {
@@ -301,7 +301,7 @@ main()
serd_node_free(&file_node);
path_str = USTR("/foo/bar");
- file_node = serd_node_new_file_uri(path_str, USTR("localhost"), 0);
+ file_node = serd_node_new_file_uri(path_str, USTR("localhost"), 0, true);
out_path = serd_file_uri_parse(file_node.buf, &hostname);
if (strcmp((const char*)file_node.buf, "file://localhost/foo/bar")) {
return failure("Bad URI %s\n", file_node.buf);
@@ -316,9 +316,9 @@ main()
serd_node_free(&file_node);
path_str = USTR("a/relative path");
- file_node = serd_node_new_file_uri(path_str, 0, 0);
+ file_node = serd_node_new_file_uri(path_str, 0, 0, false);
out_path = serd_file_uri_parse(file_node.buf, &hostname);
- if (strcmp((const char*)file_node.buf, "a/relative%20path")) {
+ if (strcmp((const char*)file_node.buf, "a/relative path")) {
return failure("Bad URI %s\n", file_node.buf);
} else if (hostname) {
return failure("hostname `%s' shouldn't exist\n", hostname);