summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-06-24 23:40:33 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-06-24 23:40:33 +0900
commitf9421dd847e3a80d3890a1e41833e5bbfcfbcc86 (patch)
treeceed138b8910f3afc7faf99dd9728102e8193f34 /src/test
parent95bbf19e2f13466ce81664a82ce29960c0154ddb (diff)
downloadsystemd-f9421dd847e3a80d3890a1e41833e5bbfcfbcc86.tar.gz
systemd-f9421dd847e3a80d3890a1e41833e5bbfcfbcc86.tar.bz2
systemd-f9421dd847e3a80d3890a1e41833e5bbfcfbcc86.zip
test: add more testcases for prefix_roota()
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-path-util.c3
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");