From 8a315ba8778378c1d9e5f03173a1c0715698a601 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 4 Feb 2018 20:49:28 +0100 Subject: Remove serd_uri_to_path() --- tests/serd_test.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'tests') diff --git a/tests/serd_test.c b/tests/serd_test.c index 1e563006..c6fb975a 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -254,42 +254,6 @@ main(void) } msg = serd_strerror((SerdStatus)-1); - // Test serd_uri_to_path - - const char* uri = "file:///home/user/foo.ttl"; - if (strcmp(serd_uri_to_path(uri), "/home/user/foo.ttl")) { - FAILF("Bad path %s for %s\n", serd_uri_to_path(uri), uri); - } - uri = "file://localhost/home/user/foo.ttl"; - if (strcmp(serd_uri_to_path(uri), "/home/user/foo.ttl")) { - FAILF("Bad path %s for %s\n", serd_uri_to_path(uri), uri); - } - uri = "file:illegal/file/uri"; - if (serd_uri_to_path(uri)) { - FAILF("Converted invalid URI `%s' to path `%s'\n", - uri, serd_uri_to_path(uri)); - } - uri = "file:///c:/awful/system"; - if (strcmp((const char*)serd_uri_to_path(uri), "c:/awful/system")) { - FAILF("Bad path %s for %s\n", serd_uri_to_path(uri), uri); - } - uri = "file:///c:awful/system"; - if (strcmp((const char*)serd_uri_to_path(uri), "/c:awful/system")) { - FAILF("Bad path %s for %s\n", serd_uri_to_path(uri), uri); - } - uri = "file:///0/1"; - if (strcmp((const char*)serd_uri_to_path(uri), "/0/1")) { - FAILF("Bad path %s for %s\n", serd_uri_to_path(uri), uri); - } - uri = "C:\\Windows\\Sucks"; - if (strcmp((const char*)serd_uri_to_path(uri), "C:\\Windows\\Sucks")) { - FAILF("Bad path %s for %s\n", serd_uri_to_path(uri), uri); - } - uri = "C|/Windows/Sucks"; - if (strcmp((const char*)serd_uri_to_path(uri), "C|/Windows/Sucks")) { - FAILF("Bad path %s for %s\n", serd_uri_to_path(uri), uri); - } - // Test file URI escaping and parsing if (check_file_uri(NULL, "C:/My 100%", true, -- cgit v1.2.1