From: Michael Tremer Date: Tue, 5 Oct 2021 15:41:44 +0000 (+0000) Subject: dependencies: Check parsing invalid inputs X-Git-Tag: 0.9.28~895 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77474f9fd5ea00f89b15ae8d39d9cb5c475f4687;p=pakfire.git dependencies: Check parsing invalid inputs Signed-off-by: Michael Tremer --- diff --git a/tests/libpakfire/dependencies.c b/tests/libpakfire/dependencies.c index 673ff71a6..dd0094bcf 100644 --- a/tests/libpakfire/dependencies.c +++ b/tests/libpakfire/dependencies.c @@ -72,6 +72,11 @@ static int test_dependencies(const struct test* t) { Id dep = 0; const char* result = NULL; + // Check some invalid inputs + ASSERT_ERRNO(pakfire_str2dep(t->pakfire, NULL) == 0, EINVAL); + ASSERT_ERRNO(pakfire_str2dep(t->pakfire, "") == 0, EINVAL); + + // Check some valid inputs for (const char** relation = relations; *relation; relation++) { printf("Parsing '%s'...\n", *relation);