Skip to content

Commit c71422a

Browse files
committed
replace CRLF with LF before asserting generated bindings
1 parent 80b7f3c commit c71422a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

crates/fspy_detours_sys/tests/bindings.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ fn detours_bindings() {
5252
if env::var("FSPY_DETOURS_WRITE_BINDINGS").as_deref() == Ok("1") {
5353
fs::write(bindings_path, bindings_content).unwrap();
5454
} else {
55-
let existing_bindings_content = fs::read_to_string(bindings_path).unwrap_or_default();
55+
let existing_bindings_content = fs::read_to_string(bindings_path)
56+
.unwrap_or_default()
57+
// Git on Windows may check out files using CRLF line endings, depending on user config.
58+
.replace("\r\n", "\n");
5659
assert_eq!(
5760
existing_bindings_content, bindings_content,
5861
"Bindings are out of date. Run this test with FSPY_DETOURS_WRITE_BINDINGS=1 to update them."

0 commit comments

Comments
 (0)