]> git.ipfire.org Git - pakfire.git/commitdiff
tests: Check if relative/absolute paths confuse pakfire_path_match
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Mar 2023 19:03:30 +0000 (19:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Mar 2023 19:04:31 +0000 (19:04 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/util.c

index 54d6df0d113fc81ff2650fd59af0d454cf983194..28f5dcee280279080437554fa1d8af04ff3538da 100644 (file)
@@ -99,6 +99,9 @@ static int test_path_match(const struct test* t) {
        ASSERT_TRUE(pakfire_path_match("/usr/lib64/**/*.so", "/usr/lib64/blah/module.so"));
        ASSERT_FALSE(pakfire_path_match("/usr/lib64/*.so.*", "/usr/lib64/beep"));
 
+       // Relatve vs. absolute?
+       ASSERT_FALSE(pakfire_path_match("/usr/lib/*.so", "relative-path"));
+
        return EXIT_SUCCESS;
 
 FAIL: