diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-10 10:25:44 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-10 10:25:44 -0700 |
commit | ba32c4f0594c68bd8d3ef53d818d30193a308d95 (patch) | |
tree | 9424e982f865ee75f9928ba4f32bac7e1a2cadac | |
parent | 7402ce32ee0cd3301677d0037718b175868a56a8 (diff) | |
download | mu-ba32c4f0594c68bd8d3ef53d818d30193a308d95.tar.gz |
1746 - load file and run a single test
$ ./mu test run-instruction-and-print-warnings
-rw-r--r-- | 050scenario.cc | 13 | ||||
-rw-r--r-- | 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<Line>::iterator locate_target(list<Line>& out, istream& directive_stream) { |