diff --git a/README.md b/README.md index 7cbe511..2b85b62 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,6 @@ Place a file called "session" with your session key cookie from https://adventof Expects runtime arguments as days, for example: -"5 9 1" executes Days 5, 9, 1 in this order. \ No newline at end of file +"5 9 1" executes Days 5, 9, 1 in this order. + +Add argument "T" before to use XX_testInput.txt rather than XX_input.txt \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 87a70ff..25dc12a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -50,7 +50,12 @@ int main(int argc, char *argv[]) { auto days = getAllDays(); std::filesystem::create_directory("input"); - for (int i = 1; i < argc; i++) { + int i = 1; + if (argc > 1 && std::string(argv[1]) == "T") { + useTestInput = true; + i++; + } + for (; i < argc; i++) { int dayNum = std::stoi(argv[i]); std::cout << "Running day " << dayNum << std::endl; Input input = getInput(dayNum, key, useTestInput); diff --git a/src/util.h b/src/util.h index 1456762..58cd494 100644 --- a/src/util.h +++ b/src/util.h @@ -7,4 +7,5 @@ #include using std::stoi, std::to_string; -using std::cout, std::endl; \ No newline at end of file +using std::cout, std::endl; +using std::string, std::vector; \ No newline at end of file