From 3864d8943b99138d46751aadda58e27a1f4e06e8 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 20 Nov 2017 09:40:55 +0100 Subject: Address PR comments --- src/tools/compiletest/src/runtest.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tools/compiletest') diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index b74867aba2d..633f349ba50 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2411,7 +2411,11 @@ actual:\n\ let mut normalized = output.replace(&parent_dir_str, "$DIR"); if json { - normalized = normalized.replace("\\n", "\n"); // verbatim newline in json strings + // escaped newlines in json strings should be readable + // in the stderr files. There's no point int being correct, + // since only humans process the stderr files. + // Thus we just turn escaped newlines back into newlines. + normalized = normalized.replace("\\n", "\n"); } normalized = normalized.replace("\\\\", "\\") // denormalize for paths on windows -- cgit 1.4.1-3-g733a5