1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #include "analyze-verify.h"
5 static void test_verify_nonexistent(void) {
7 assert_se(verify_executable(NULL
, &(ExecCommand
) {.flags
= EXEC_COMMAND_IGNORE_FAILURE
, .path
= (char*) "/non/existent"}) == 0);
8 assert_se(verify_executable(NULL
, &(ExecCommand
) {.path
= (char*) "/non/existent"}) < 0);
11 assert_se(verify_executable(NULL
, &(ExecCommand
) {.path
= (char*) "/bin/echo"}) == 0);
12 assert_se(verify_executable(NULL
, &(ExecCommand
) {.flags
= EXEC_COMMAND_IGNORE_FAILURE
, .path
= (char*) "/bin/echo"}) == 0);
15 int main(int argc
, char *argv
[]) {
16 test_setup_logging(LOG_DEBUG
);
18 test_verify_nonexistent();