fix(cli): only remove test input's trailing '\r' if running on windows

platform
This commit is contained in:
WillLillis 2025-01-11 16:53:29 -05:00 committed by Amaan Qureshi
parent cd6e766365
commit dcfc95e563
2 changed files with 2 additions and 1 deletions

View file

@ -898,6 +898,7 @@ fn parse_test_content(name: String, content: &str, file_path: Option<PathBuf>) -
// Remove trailing newline from the input.
input.pop();
#[cfg(target_os = "windows")]
if input.last() == Some(&b'\r') {
input.pop();
}

View file

@ -19,7 +19,7 @@ anonymous tokens defined with LF escape sequence
anonymous tokens defined with CR escape sequence
=================================================
---
(first_rule)