1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00

test: add more tests for path_startswith()

This commit is contained in:
Yu Watanabe 2021-02-19 00:49:37 +09:00
parent 9dcde1034c
commit 1dff135bf9

View File

@ -481,6 +481,9 @@ static void test_path_startswith(void) {
assert_se(!path_startswith("/foo/bar/barfoo/", ""));
assert_se(!path_startswith("/foo/bar/barfoo/", "/bar/foo"));
assert_se(!path_startswith("/foo/bar/barfoo/", "/f/b/b/"));
assert_se(!path_startswith("/foo/bar/barfoo/", "/foo/bar/barfo"));
assert_se(!path_startswith("/foo/bar/barfoo/", "/foo/bar/bar"));
assert_se(!path_startswith("/foo/bar/barfoo/", "/fo"));
}
static void test_prefix_root_one(const char *r, const char *p, const char *expected) {