From: Zbigniew Jędrzejewski-Szmek Date: Tue, 15 Sep 2020 20:49:52 +0000 (+0200) Subject: test-path-util: also check filename_is_valid() with paths with slashes X-Git-Tag: v247-rc1~176^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c32257147e1631665f27daf9c01b6f18e3cb9f3;p=thirdparty%2Fsystemd.git test-path-util: also check filename_is_valid() with paths with slashes --- diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c index 46cdbaf5cc3..f0033bb545c 100644 --- a/src/test/test-path-util.c +++ b/src/test/test-path-util.c @@ -537,6 +537,9 @@ static void test_filename_is_valid(void) { assert_se(!filename_is_valid("/")); assert_se(!filename_is_valid(".")); assert_se(!filename_is_valid("..")); + assert_se(!filename_is_valid("bar/foo")); + assert_se(!filename_is_valid("bar/foo/")); + assert_se(!filename_is_valid("bar//")); for (i=0; i