path-util: document a few other special cases for last_path_component()
This commit is contained in:
@@ -399,6 +399,10 @@ static void test_last_path_component(void) {
|
||||
assert_se(streq(last_path_component("/foo/a"), "a"));
|
||||
assert_se(streq(last_path_component("/foo/a/"), "a/"));
|
||||
assert_se(streq(last_path_component(""), ""));
|
||||
assert_se(streq(last_path_component("a"), "a"));
|
||||
assert_se(streq(last_path_component("a/"), "a/"));
|
||||
assert_se(streq(last_path_component("/a"), "a"));
|
||||
assert_se(streq(last_path_component("/a/"), "a/"));
|
||||
}
|
||||
|
||||
static void test_filename_is_valid(void) {
|
||||
|
||||
Reference in New Issue
Block a user