diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-12-28 14:23:12 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-12-28 14:23:46 +1100 |
| commit | f55736365a886d6fbb90cf97e3941c76d77536f2 (patch) | |
| tree | cca41b2f81a834e2235f0e6ff4b5a935b4805e86 | |
| parent | 3a4e82195e08a77d542078cadcc881105e9d0838 (diff) | |
compiletest: Make a FIXME for escaped newlines less confusing
The old FIXME implies that we don't support escaped newlines, but in fact it was added in the same patch that added support for escaped newlines. The new FIXME makes it clear that we do currently support this, and that the FIXME is for doing so in a less ad-hoc way.
| -rw-r--r-- | src/tools/compiletest/src/header.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 73d00fbf7b8..48149e3b897 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -1156,7 +1156,9 @@ fn parse_normalize_rule(raw_value: &str) -> Option<(String, String)> { .captures(raw_value)?; let regex = captures["regex"].to_owned(); let replacement = captures["replacement"].to_owned(); - // FIXME: Support escaped new-line in strings. + // A `\n` sequence in the replacement becomes an actual newline. + // FIXME: Do unescaping in a less ad-hoc way, and perhaps support escaped + // backslashes and double-quotes. let replacement = replacement.replace("\\n", "\n"); Some((regex, replacement)) } |
