Allow --run-tests to take a file argument
This commit is contained in:
1 parent
3f86e97f70
commit
0ed6347d47
2 files changed
+10
-2
No files matched your search
@@ -10,8 +10,16 @@ static void run_jq_tests();
|
||||
|
||||
|
||||
int jq_testsuite(int argc, char* argv[]) {
|
||||
FILE *testdata = stdin;
|
||||
jv_test();
|
||||
run_jq_tests(stdin);
|
||||
if (argc > 2) {
|
||||
testdata = fopen(argv[2], "re");
|
||||
if (!testdata) {
|
||||
perror("fopen");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
run_jq_tests(testdata);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user