From 08cfd02d8cab9a275419d1441db291fc203ea366 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Fri, 23 Jan 2015 11:33:47 -0600 Subject: [PATCH] fix minor bugs in test-runner --- src/jsontestrunner/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 @@ static int parseCommandLine( 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 @@ int main(int argc, const char* argv[]) { 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());