From: Arran Cudbard-Bell Date: Sat, 3 Nov 2018 00:46:56 +0000 (-0400) Subject: Process multiple test files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d2eaf64768e7599cc349ffe8063b6930697b311;p=thirdparty%2Ffreeradius-server.git Process multiple test files --- diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index ba6e3c5fe26..a9cc9619a97 100644 --- a/src/bin/unit_test_attribute.c +++ b/src/bin/unit_test_attribute.c @@ -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; } /*