Fix --run-tests arg handling
This commit is contained in:
1 parent
6e7cf81d74
commit
d927a2c185
2 files changed
+6
-3
No files matched your search
@@ -12,8 +12,8 @@ static void run_jq_tests();
|
||||
int jq_testsuite(jv libdirs, int argc, char* argv[]) {
|
||||
FILE *testdata = stdin;
|
||||
jv_test();
|
||||
if (argc > 2) {
|
||||
testdata = fopen(argv[2], "r");
|
||||
if (argc > 0) {
|
||||
testdata = fopen(argv[0], "r");
|
||||
if (!testdata) {
|
||||
perror("fopen");
|
||||
exit(1);
|
||||
|
||||
Reference in new issue
Block a user