about summary refs log tree commit diff stats
path: root/cpp/tangle/030tangle.test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/tangle/030tangle.test.cc')
-rw-r--r--cpp/tangle/030tangle.test.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/tangle/030tangle.test.cc b/cpp/tangle/030tangle.test.cc
index d97981dc..ea1b9c2b 100644
--- a/cpp/tangle/030tangle.test.cc
+++ b/cpp/tangle/030tangle.test.cc
@@ -280,6 +280,17 @@ void test_tangle_can_check_for_absence_at_end_of_scenarios2() {
   CHECK(lines.empty());
 }
 
+void test_tangle_can_check_for_count_in_scenario() {
+  istringstream in(":(scenario does_bar)\nabc def\n  efg\n$layer1: 2");
+  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_EQ(trace_count(\"layer1\"), 2);");  lines.pop_front();
+  CHECK_EQ(lines.front().contents, "}");  lines.pop_front();
+  CHECK(lines.empty());
+}
+
 
 
 void test_trim() {