From ba32c4f0594c68bd8d3ef53d818d30193a308d95 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 10 Jul 2015 10:25:44 -0700 Subject: 1746 - load file and run a single test $ ./mu test run-instruction-and-print-warnings --- 050scenario.cc | 13 ++++++------- tangle/030tangle.cc | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/050scenario.cc b/050scenario.cc index a87c1b26..8200d702 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -116,13 +116,12 @@ for (long long int i = 0; i < SIZE(Scenarios); ++i) { } //: Convenience: run a single named scenario. -:(before "Loading Commandline Files") -if (argc == 2 && Run_tests) { - for (long long int i = 0; i < SIZE(Scenarios); ++i) { - if (Scenarios.at(i).name == argv[1]) { - run_mu_scenario(Scenarios.at(i)); - return 0; - } +:(after "Test Runs") +for (long long int i = 0; i < SIZE(Scenarios); ++i) { + if (Scenarios.at(i).name == argv[argc-1]) { + run_mu_scenario(Scenarios.at(i)); + if (Passed) cerr << ".\n"; + return 0; } } diff --git a/tangle/030tangle.cc b/tangle/030tangle.cc index 57a10a9e..618d7fa1 100644 --- a/tangle/030tangle.cc +++ b/tangle/030tangle.cc @@ -197,7 +197,7 @@ void process_next_hunk(istream& in, const string& directive, const string& filen return; } - raise << "unknown directive " << cmd << '\n'; + raise << "unknown directive " << cmd << '\n' << die(); } list::iterator locate_target(list& out, istream& directive_stream) { -- cgit 1.4.1-2-gfad0