diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-27 11:27:50 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-27 11:27:50 -0700 |
commit | 1326a4ec1ba2dfa093f8cf66e02d93ff7f4cebc6 (patch) | |
tree | bffbf0999e8c017e00f146930cc4c378461393e8 /050scenario.cc | |
parent | ab3aa2d4c141c30958f65aaf5bd86091b0e61621 (diff) | |
download | mu-1326a4ec1ba2dfa093f8cf66e02d93ff7f4cebc6.tar.gz |
1483 - *really* check color screens in scenarios
Required fixing two levels of bugs: a) The hack in tangle to drop initial comments a '%' directive.. b) ..was masking a bug where run_mu_scenario wasn't robust to initial comments. Mildly concerned that neither of the sub-issues have their own tests, but I'm just removing hacks, and writing tests for that throwaway function like run_mu_scenario seems pointless. Instead I've solved the problem by disallowing comments before '%' directives. I've also taken this opportunity to at least try to document the 'scenarios' and '%' directives at the first layer where they appear.
Diffstat (limited to '050scenario.cc')
-rw-r--r-- | 050scenario.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/050scenario.cc b/050scenario.cc index c4acc688..06c14c8e 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -494,8 +494,9 @@ recipe main [ void run_mu_scenario(const string& form) { istringstream in(form); in >> std::noskipws; + skip_whitespace_and_comments(in); string _scenario = next_word(in); -//? cout << _scenario << '\n'; //? 1 +//? cout << _scenario << '\n'; //? 2 assert(_scenario == "scenario"); scenario s = parse_scenario(in); run_mu_scenario(s); |