| 258 | } |
| 259 | |
| 260 | static 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 | |
| 281 | static enum parse_opt_flags test_flags = 0; |
| 282 | static const struct option test_flag_options[] = { |
no test coverage detected