Add -v option parsing to regress tests, currently a no-op.
This will be used by a "check-verbose" target in the future.
This commit is contained in:
@@ -62,10 +62,24 @@ int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
const char *cp, *ep, *input_end;
|
||||
int i, j, errors = 0, ntests = 0;
|
||||
int ch, i, j, errors = 0, ntests = 0;
|
||||
size_t len;
|
||||
|
||||
initprogname(argc > 0 ? argv[0] : "strsplit_test");
|
||||
|
||||
while ((ch = getopt(argc, argv, "v")) != -1) {
|
||||
switch (ch) {
|
||||
case 'v':
|
||||
/* ignore */
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "usage: %s [-v]\n", getprogname());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
for (i = 0; test_data[i].input != NULL; i++) {
|
||||
input_end = test_data[i].input + test_data[i].input_len;
|
||||
cp = sudo_strsplit(test_data[i].input, input_end, " \t", &ep);
|
||||
|
Reference in New Issue
Block a user