about summary refs log tree commit diff stats
path: root/cpp/tangle/030tangle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/tangle/030tangle.cc')
-rw-r--r--cpp/tangle/030tangle.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/tangle/030tangle.cc b/cpp/tangle/030tangle.cc
index 2f81b23f..088ba7e8 100644
--- a/cpp/tangle/030tangle.cc
+++ b/cpp/tangle/030tangle.cc
@@ -203,6 +203,10 @@ list<string>::iterator balancing_curly(list<string>::iterator orig) {
 void emit_test(const string& name, list<string>& lines, list<string>& result) {
   result.push_back("TEST("+name+")");
   while (any_non_input_line(lines)) {
+    if (is_warn(lines.front())) {
+      result.push_back("  Hide_warnings = true;");
+      lines.pop_front();
+    }
     result.push_back("  "+Toplevel+"(\""+input_lines(lines)+"\");");
     if (!lines.empty() && lines.front()[0] == '+')
       result.push_back("  CHECK_TRACE_CONTENTS(\""+expected_in_trace(lines)+"\");");
@@ -234,6 +238,10 @@ bool is_input(const string& line) {
   return line != "===" && line[0] != '+' && line[0] != '-' && !starts_with(line, "=>");
 }
 
+bool is_warn(const string& line) {
+  return line == "hide warnings";
+}
+
 string input_lines(list<string>& hunk) {
   string result;
   while (!hunk.empty() && is_input(hunk.front())) {