From 2d2eaf64768e7599cc349ffe8063b6930697b311 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Fri, 2 Nov 2018 20:46:56 -0400 Subject: [PATCH] Process multiple test files --- src/bin/unit_test_attribute.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bin/unit_test_attribute.c b/src/bin/unit_test_attribute.c index ba6e3c5fe261..a9cc9619a97d 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; } /*