- Add unit tests for handlers - Update sources.mk to remove test_parse.c from test sources - Fix in handle_size to set packet_size instead of count
14 lines
330 B
C
14 lines
330 B
C
#include "cli.h"
|
|
#include "ft_ping_flags.h"
|
|
#include <criterion/criterion.h>
|
|
|
|
/* Test 1: test flag*/
|
|
Test(handle_quiet, flag_test)
|
|
{
|
|
t_ping_config config = {0};
|
|
const char *arg = "";
|
|
const int ret = cli_handle_quiet(arg, &config);
|
|
|
|
cr_assert(HAS_FLAG(config.flags, FLAG_QUIET));
|
|
cr_assert_eq(ret, CLI_SUCCESS);
|
|
}
|