15 lines
386 B
C
15 lines
386 B
C
#include "ping/cli.h"
|
|
#include "ping/ft_ping_flags.h"
|
|
#include "internal/ping/cli_handlers.h"
|
|
#include <criterion/criterion.h>
|
|
|
|
/* Test 1: test flag*/
|
|
Test(handle_verbose, flag_test)
|
|
{
|
|
t_ping_config config = {0};
|
|
const char *arg = "";
|
|
const int ret = cli_handle_verbose(arg, &config);
|
|
|
|
cr_assert(HAS_FLAG(config.flags, FLAG_VERBOSE));
|
|
cr_assert_eq(ret, CLI_SUCCESS);
|
|
}
|