about summary refs log tree commit diff stats
path: root/subx/003trace.test.cc
diff options
context:
space:
mode:
authornc <nc@charliethe.ninja>2019-04-13 19:58:36 -0400
committernc <nc@charliethe.ninja>2019-04-13 22:07:48 -0400
commit1209ddac2b17242a001c257e661973c050d6b2e4 (patch)
tree21c62ac450e69fd4b1dc98b545860767101bed1e /subx/003trace.test.cc
parentebb4f558699a325afc234b5125bce0d02aee370a (diff)
downloadmu-1209ddac2b17242a001c257e661973c050d6b2e4.tar.gz
Add support for escape sequences in string literals fixed traces so they can handle newlines
Diffstat (limited to 'subx/003trace.test.cc')
-rw-r--r--subx/003trace.test.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/subx/003trace.test.cc b/subx/003trace.test.cc
index addc1f44..bec1b789 100644
--- a/subx/003trace.test.cc
+++ b/subx/003trace.test.cc
@@ -64,6 +64,11 @@ void test_trace_count_ignores_trailing_whitespace() {
   CHECK_EQ(trace_count("test layer 1", "foo"), 1);
 }
 
+void test_trace_unescapes_newlines() {
+  trace("test layer 1") << "f\no\no\n" << end();
+  CHECK_TRACE_CONTENTS("test layer 1: f\\no\\no");
+}
+
 // pending: DUMP tests
 // pending: readable_contents() adds newline if necessary.
 // pending: raise also prints to stderr.