| lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #include <argp.h> |
| 2 | |||||
| 3 | |||||
| 4 | static const struct argp_option test_options[] = | ||||
| 5 | { | ||||
| 6 | { NULL, 'a', NULL, OPTION_DOC, NULL }, | ||||
| 7 | { NULL, 'b', NULL, OPTION_DOC, NULL }, | ||||
| 8 | { NULL, 0, NULL, 0, NULL } | ||||
| 9 | }; | ||||
| 10 | |||||
| 11 | static struct argp test_argp = | ||||
| 12 | { | ||||
| 13 | test_options | ||||
| 14 | }; | ||||
| 15 | |||||
| 16 | |||||
| 17 | static int | ||||
| 18 | do_test (int argc, char *argv[]) | ||||
| 19 | { | ||||
| 20 | int i; | ||||
| 21 | argp_parse (&test_argp, argc, argv, 0, &i, NULL); | ||||
| 22 | return 0; | ||||
| 23 | } | ||||
| 24 | |||||
| 25 | #define TEST_FUNCTION do_test (argc, argv) | ||||
| 26 | #include "../test-skeleton.c" | ||||