Skip to content

Commit

Permalink
fix(cli): only remove test input's trailing '\r' if running on windows
Browse files Browse the repository at this point in the history
platform
  • Loading branch information
WillLillis authored and amaanq committed Jan 11, 2025
1 parent cd6e766 commit dcfc95e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ anonymous tokens defined with LF escape sequence
anonymous tokens defined with CR escape sequence
=================================================


---

(first_rule)
Expand Down

0 comments on commit dcfc95e

Please sign in to comment.