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:
@@ -47,12 +47,24 @@ main(int argc, char *argv[])
|
||||
{
|
||||
struct strtomode_data *d;
|
||||
const char *errstr;
|
||||
int errors = 0;
|
||||
int ntests = 0;
|
||||
int ch, errors = 0, ntests = 0;
|
||||
mode_t mode;
|
||||
|
||||
initprogname(argc > 0 ? argv[0] : "strtomode_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 (d = strtomode_data; d->mode_str != NULL; d++) {
|
||||
ntests++;
|
||||
errstr = "some error";
|
||||
|
Reference in New Issue
Block a user