net-tools/tests/cli/handlers/test_handler_map.c
lohhiiccc f6af6473db test(cli/handlers): add unit tests for CLI handlers
- 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
2026-03-03 11:26:58 +01:00

17 lines
503 B
C

#include "cli.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);
}