mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-02-25 07:41:07 +01:00
fix minor bugs in test-runner
This commit is contained in:
parent
79211e1aeb
commit
08cfd02d8c
@ -232,7 +232,7 @@ static int parseCommandLine(
|
|||||||
opts->parseOnly = true;
|
opts->parseOnly = true;
|
||||||
++index;
|
++index;
|
||||||
}
|
}
|
||||||
if (std::string(argv[1]) == "--json-config") {
|
if (std::string(argv[index]) == "--json-config") {
|
||||||
printConfig();
|
printConfig();
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ int main(int argc, const char* argv[]) {
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string basePath = removeSuffix(argv[1], ".json");
|
std::string basePath = removeSuffix(opts.path, ".json");
|
||||||
if (!opts.parseOnly && basePath.empty()) {
|
if (!opts.parseOnly && basePath.empty()) {
|
||||||
printf("Bad input path. Path does not end with '.expected':\n%s\n",
|
printf("Bad input path. Path does not end with '.expected':\n%s\n",
|
||||||
opts.path.c_str());
|
opts.path.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user