Skip to content

Commit

Permalink
Process multiple test files
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Dec 10, 2018
1 parent 2031396 commit 2d2eaf6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/bin/unit_test_attribute.c
Expand Up @@ -1483,10 +1483,19 @@ int main(int argc, char *argv[])
goto done;
}

/*
* Read tests from stdin
*/
if (argc < 2) {
if (process_file(features, dict, NULL, "-") < 0) ret = EXIT_FAILURE;

/*
* ...or process each file in turn.
*/
} else {
if (process_file(features, dict, NULL, argv[1]) < 0) ret = EXIT_FAILURE;
int i;

for (i = 1; i < argc; i++) if (process_file(features, dict, NULL, argv[i]) < 0) ret = EXIT_FAILURE;
}

/*
Expand Down

0 comments on commit 2d2eaf6

Please sign in to comment.