diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-04-05 18:00:39 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | 97ac04b502a8bbe11b8a58adcecaf7d7bc3f478e (patch) | |
tree | ab5b4656a95680096e669fca92bc90c0bb3e6e40 /src/test/test-path-util.c | |
parent | b628c4dded8d514451cee188245aec42aea0707e (diff) |
path-util: document a few other special cases for last_path_component()
Diffstat (limited to 'src/test/test-path-util.c')
-rw-r--r-- | src/test/test-path-util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c index 057c06e8c..f7e96283f 100644 --- a/src/test/test-path-util.c +++ b/src/test/test-path-util.c @@ -401,6 +401,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) { |