diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-04-29 11:45:43 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-04-29 11:45:43 -0700 |
commit | 4f5cf6683350f8ba9159c953a868b8d393bcd1ae (patch) | |
tree | 0b7fdee183f48f4c161afd3b18c653a7a8c4bea1 /cpp/tangle/030tangle.test.cc | |
parent | 519681dfe7abbe502918892b98deeb88597f4010 (diff) | |
download | mu-4f5cf6683350f8ba9159c953a868b8d393bcd1ae.tar.gz |
1220 - permit mu comments in tangle scenarios
Diffstat (limited to 'cpp/tangle/030tangle.test.cc')
-rw-r--r-- | cpp/tangle/030tangle.test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/tangle/030tangle.test.cc b/cpp/tangle/030tangle.test.cc index ea1b9c2b..9ea0353d 100644 --- a/cpp/tangle/030tangle.test.cc +++ b/cpp/tangle/030tangle.test.cc @@ -291,6 +291,19 @@ void test_tangle_can_check_for_count_in_scenario() { CHECK(lines.empty()); } +void test_tangle_can_handle_mu_comments_in_scenario() { + istringstream in(":(scenario does_bar)\nabc def\n# comment1\n efg\n # indented comment 2\n+layer1: pqr\n# comment inside expected_trace\n+layer1: xyz\n# comment after expected trace\n-layer1: z\n# comment before trace count\n$layer1: 2\n# comment at end\n\n"); + list<Line> lines; + tangle(in, lines); + CHECK_EQ(lines.front().contents, "TEST(does_bar)"); lines.pop_front(); + CHECK_EQ(lines.front().contents, " run(\"abc def\\n efg\\n\");"); lines.pop_front(); + CHECK_EQ(lines.front().contents, " CHECK_TRACE_CONTENTS(\"layer1: pqrlayer1: xyz\");"); lines.pop_front(); + CHECK_EQ(lines.front().contents, " CHECK_TRACE_DOESNT_CONTAIN(\"layer1: z\");"); lines.pop_front(); + CHECK_EQ(lines.front().contents, " CHECK_EQ(trace_count(\"layer1\"), 2);"); lines.pop_front(); + CHECK_EQ(lines.front().contents, "}"); lines.pop_front(); + CHECK(lines.empty()); +} + void test_trim() { |