fix minor bugs in test-runner
diff --git a/src/jsontestrunner/main.cpp b/src/jsontestrunner/main.cpp
index 5db8115..a44a081 100644
--- a/src/jsontestrunner/main.cpp
+++ b/src/jsontestrunner/main.cpp
@@ -232,7 +232,7 @@
opts->parseOnly = true;
++index;
}
- if (std::string(argv[1]) == "--json-config") {
+ if (std::string(argv[index]) == "--json-config") {
printConfig();
return 3;
}
@@ -259,7 +259,7 @@
return 3;
}
- std::string basePath = removeSuffix(argv[1], ".json");
+ std::string basePath = removeSuffix(opts.path, ".json");
if (!opts.parseOnly && basePath.empty()) {
printf("Bad input path. Path does not end with '.expected':\n%s\n",
opts.path.c_str());