- 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
17 lines
520 B
C
17 lines
520 B
C
#include "internal/arg_handler.h"
|
|
#include <criterion/criterion.h>
|
|
#include <stddef.h>
|
|
|
|
/* Test 1: g_options is null terminated */
|
|
Test(_test_handler_map, always_pass)
|
|
{
|
|
size_t i = 0;
|
|
for (i = 0; NULL != g_options[i].description; ++i);
|
|
|
|
cr_assert(g_options[i].description == NULL);
|
|
cr_assert(g_options[i].arg_type == 0);
|
|
cr_assert(g_options[i].handler == NULL);
|
|
cr_assert(g_options[i].has_arg == 0);
|
|
cr_assert(g_options[i].long_opt == NULL);
|
|
cr_assert(g_options[i].short_opt == 0);
|
|
}
|