From 9d5c526e264e2fe13f8b579528da21b54c65ab9e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 12 Nov 2022 17:54:31 -0500 Subject: Use zix_path_lexically_relative() --- test/test_filesystem.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'test') diff --git a/test/test_filesystem.c b/test/test_filesystem.c index 4ed1d5e..99e4f3c 100644 --- a/test/test_filesystem.c +++ b/test/test_filesystem.c @@ -37,29 +37,6 @@ test_path_is_child(void) assert(!lilv_path_is_child("/a/b/", "/c/")); } -static void -test_path_relative_to(void) -{ - assert(equals(lilv_path_relative_to("/a/b", "/a/"), "b")); - assert(equals(lilv_path_relative_to("/a", "/b/c/"), "/a")); - assert(equals(lilv_path_relative_to("/a/b/c", "/a/b/d/"), "../c")); - assert(equals(lilv_path_relative_to("/a/b/c", "/a/b/d/e/"), "../../c")); - -#ifdef _WIN32 - assert(equals(lilv_path_relative_to("C:/a/b", "C:/a/"), "b")); - assert(equals(lilv_path_relative_to("C:/a", "C:/b/c/"), "../../a")); - assert(equals(lilv_path_relative_to("C:/a/b/c", "C:/a/b/d/"), "../c")); - assert(equals(lilv_path_relative_to("C:/a/b/c", "C:/a/b/d/e/"), "../../c")); - - assert(equals(lilv_path_relative_to("C:\\a\\b", "C:\\a\\"), "b")); - assert(equals(lilv_path_relative_to("C:\\a", "C:\\b\\c\\"), "..\\..\\a")); - assert( - equals(lilv_path_relative_to("C:\\a\\b\\c", "C:\\a\\b\\d\\"), "..\\c")); - assert(equals(lilv_path_relative_to("C:\\a\\b\\c", "C:\\a\\b\\d\\e\\"), - "..\\..\\c")); -#endif -} - static void test_path_parent(void) { @@ -102,7 +79,6 @@ int main(void) { test_path_is_child(); - test_path_relative_to(); test_path_parent(); test_path_filename(); -- cgit v1.2.1