]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Process multiple test files
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 3 Nov 2018 00:46:56 +0000 (20:46 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 10 Dec 2018 16:20:37 +0000 (11:20 -0500)
src/bin/unit_test_attribute.c

index ba6e3c5fe2611ea346f70585743eb538fa81dde5..a9cc9619a97deddceea172d58435585ebc4b8724 100644 (file)
@@ -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;
        }
 
        /*