1
Fork 0

Address PR comments

This commit is contained in:
Oliver Schneider 2017-11-20 09:40:55 +01:00
parent ddaf523aa4
commit 3864d8943b
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
2 changed files with 6 additions and 2 deletions

View file

@ -200,7 +200,7 @@ impl Diagnostic {
children: db.children.iter().map(|c| { children: db.children.iter().map(|c| {
Diagnostic::from_sub_diagnostic(c, je) Diagnostic::from_sub_diagnostic(c, je)
}).chain(sugg).collect(), }).chain(sugg).collect(),
rendered: Some(output.to_owned()), rendered: Some(output),
} }
} }

View file

@ -2411,7 +2411,11 @@ actual:\n\
let mut normalized = output.replace(&parent_dir_str, "$DIR"); let mut normalized = output.replace(&parent_dir_str, "$DIR");
if json { 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 normalized = normalized.replace("\\\\", "\\") // denormalize for paths on windows