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 /tangle/030tangle.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 'tangle/030tangle.cc')
-rw-r--r-- | tangle/030tangle.cc | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/tangle/030tangle.cc b/tangle/030tangle.cc index 5e25c742..4949808a 100644 --- a/tangle/030tangle.cc +++ b/tangle/030tangle.cc @@ -301,11 +301,6 @@ list<Line>::iterator balancing_curly(list<Line>::iterator curr) { void emit_test(const string& name, list<Line>& lines, list<Line>& result) { result.push_back(Line("TEST("+name+")", front(lines).filename, front(lines).line_number-1)); // use line number of directive while (!lines.empty()) { - // hack: drop mu comments at the start, just in case there's a '%' line after them - // So the tangler only passes through mu comments inside scenarios between - // the first input line and the last input line. - while (!lines.empty() && starts_with(front(lines).contents, "#")) - lines.pop_front(); while (!lines.empty() && starts_with(front(lines).contents, "% ")) { result.push_back(Line(" "+front(lines).contents.substr(strlen("% ")), front(lines))); lines.pop_front(); |