Skip to content

Commit

Permalink
compiletest: un-escape new-line in normalize replacement string
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Dec 1, 2024
1 parent 85e4765 commit 1c4657d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,8 @@ fn parse_normalize_rule(header: &str) -> Option<(String, String)> {
.captures(header)?;
let regex = captures["regex"].to_owned();
let replacement = captures["replacement"].to_owned();
// FIXME: Support escaped new-line in strings.
let replacement = replacement.replace("\\n", "\n");
Some((regex, replacement))
}

Expand Down

0 comments on commit 1c4657d

Please sign in to comment.