#include "kpl_test.h" KPL_TEST(config_show_help) { kpl_config config; const int32_t argc = 2; const char *argv[] = { "./kpl", "--help", "not_used" }; kpl_config_init(&config); int32_t code = kpl_config_parse_args(&config, argc, argv); KPL_ASSERT(code == KPL_EXIT_CODE_HELP, "Invalid help exit code"); } KPL_TEST(config_change_module_extension) { kpl_config config; const int32_t argc = 3; const char *argv[] = { "./kpl", "--module-extension=.l", "./file.l" }; kpl_config_init(&config); int32_t code = kpl_config_parse_args(&config, argc, argv); KPL_ASSERT(code == KPL_EXIT_CODE_SUCCESS, "Invalid exit code"); KPL_ASSERT(strcmp(config.module_extension, ".l") == 0, "Invalid new module extension"); }