diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-24 16:40:33 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-24 16:40:33 +0200 |
commit | f9421dd847e3a80d3890a1e41833e5bbfcfbcc86 (patch) | |
tree | ceed138b8910f3afc7faf99dd9728102e8193f34 /src | |
parent | path-util: fix an issue when the path argument of prefix_roota() is not absolute (diff) | |
download | systemd-f9421dd847e3a80d3890a1e41833e5bbfcfbcc86.tar.xz systemd-f9421dd847e3a80d3890a1e41833e5bbfcfbcc86.zip |
test: add more testcases for prefix_roota()
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test-path-util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c index 7ef30ffc00..3e91c87eea 100644 --- a/src/test/test-path-util.c +++ b/src/test/test-path-util.c @@ -403,6 +403,9 @@ static void test_prefix_root(void) { test_prefix_root_one("///", "/foo", "/foo"); test_prefix_root_one("/", "////foo", "/foo"); test_prefix_root_one(NULL, "////foo", "/foo"); + test_prefix_root_one("/", "foo", "/foo"); + test_prefix_root_one("", "foo", "foo"); + test_prefix_root_one(NULL, "foo", "foo"); test_prefix_root_one("/foo", "/bar", "/foo/bar"); test_prefix_root_one("/foo", "bar", "/foo/bar"); |