]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add more testcases for prefix_roota()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 24 Jun 2019 14:40:33 +0000 (23:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 24 Jun 2019 14:40:33 +0000 (23:40 +0900)
src/test/test-path-util.c

index 7ef30ffc00ef171866e0c2ba2fe9e88ad97eb855..3e91c87eea45c089484c0c90805facd1eab7deec 100644 (file)
@@ -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");