From 21b0b490282292ce1b235a7d52cb7337e035f422 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 17 Mar 2023 12:13:53 +0000 Subject: [PATCH] tests: Add check for pakfire_path_match with stars in middle Signed-off-by: Michael Tremer --- tests/libpakfire/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/libpakfire/util.c b/tests/libpakfire/util.c index cea03ba3..50276a2c 100644 --- a/tests/libpakfire/util.c +++ b/tests/libpakfire/util.c @@ -94,6 +94,10 @@ static int test_path_match(const struct test* t) { // Partial paths shouldn't match ASSERT_FALSE(pakfire_path_match("/usr", "/usr/bin/bash")); + // Check for stars in the middle + ASSERT_TRUE(pakfire_path_match("/usr/lib64/*.so.*", "/usr/lib64/libblah.so.1")); + ASSERT_TRUE(pakfire_path_match("/usr/lib64/**/*.so", "/usr/lib64/blah/module.so")); + return EXIT_SUCCESS; FAIL: -- 2.47.3