MCPcopy Create free account
hub / github.com/git/git / parse_options_flags__cmd

Function parse_options_flags__cmd

t/helper/test-parse-options.c:260–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260static int parse_options_flags__cmd(int argc, const char **argv,
261 enum parse_opt_flags test_flags)
262{
263 const char *usage[] = {
264 "<...> cmd [options]",
265 NULL
266 };
267 int opt = 0;
268 const struct option options[] = {
269 OPT_INTEGER('o', "opt", &opt, "an integer option"),
270 OPT_END()
271 };
272
273 argc = parse_options(argc, argv, NULL, options, usage, test_flags);
274
275 printf("opt: %d\n", opt);
276 print_args(argc, argv);
277
278 return 0;
279}
280
281static enum parse_opt_flags test_flags = 0;
282static const struct option test_flag_options[] = {

Callers 1

cmd__parse_options_flagsFunction · 0.85

Calls 2

parse_optionsFunction · 0.85
print_argsFunction · 0.85

Tested by

no test coverage detected