basic: add path_equal_filename helper

This commit is contained in:
Luca Boccassi
2021-04-07 14:03:49 +01:00
parent b7ddd44497
commit 727e63e33e
3 changed files with 28 additions and 0 deletions
+5
View File
@@ -113,6 +113,11 @@ static void test_path(void) {
assert_se(!path_equal_ptr("/a", "/b"));
assert_se(!path_equal_ptr("/a", NULL));
assert_se(!path_equal_ptr(NULL, "/a"));
assert_se(path_equal_filename("/a/c", "/b/c"));
assert_se(path_equal_filename("/a", "/a"));
assert_se(!path_equal_filename("/a/b", "/a/c"));
assert_se(!path_equal_filename("/b", "/c"));
}
static void test_path_equal_root(void) {