- Move CLI internal headers to `includes/internal/cli/` - Split CLI handler and parsing declarations across dedicated internal headers - Move handler map to `option_map.c` and properly update references - Relocate CLI utility source and test files from `utils` to `parse_utils` - Refactor `cli.h` to only expose the public interface, move internal typedefs/functions out - Update build system: add conditional git commit detection
15 lines
364 B
C
15 lines
364 B
C
#include <criterion/criterion.h>
|
|
#include "cli.h"
|
|
#include "internal/arg_handler.h"
|
|
#include "ft_ping_flags.h"
|
|
|
|
/* Test 1: test flag*/
|
|
Test(handle_flood, flag_test)
|
|
{
|
|
t_ping_config config = {0};
|
|
const char *arg = "";
|
|
const int ret = cli_handle_flood(arg, &config);
|
|
|
|
cr_assert(HAS_FLAG(config.flags, FLAG_FLOOD));
|
|
cr_assert_eq(ret, CLI_SUCCESS);
|
|
}
|