about summary refs log tree commit diff stats
path: root/subx/003trace.test.cc
diff options
context:
space:
mode:
authorKartik Agaram <github@akkartik.com>2019-04-13 20:40:20 -0700
committerGitHub <noreply@github.com>2019-04-13 20:40:20 -0700
commit7e32b35c9c54e111841f0ed4f9f7343367055460 (patch)
tree21c62ac450e69fd4b1dc98b545860767101bed1e /subx/003trace.test.cc
parentebb4f558699a325afc234b5125bce0d02aee370a (diff)
parent1209ddac2b17242a001c257e661973c050d6b2e4 (diff)
downloadmu-7e32b35c9c54e111841f0ed4f9f7343367055460.tar.gz
Merge pull request #18 from charles-l/master
Add support for escape sequences in string literals.
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.