test(linter): fix some oxlint tests on windows (#8204)

This commit is contained in:
Cameron 2025-01-01 02:22:10 +00:00 committed by GitHub
parent e5ee38fdf1
commit cb709c9d83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -705,8 +705,10 @@ mod test {
panic!("Expected PrintConfigResult, got {ret:?}")
};
let expect_json =
std::fs::read_to_string("fixtures/print_config/normal/expect.json").unwrap();
#[expect(clippy::disallowed_methods)]
let expect_json = std::fs::read_to_string("fixtures/print_config/normal/expect.json")
.unwrap()
.replace("\r\n", "\n");
assert_eq!(config, expect_json.trim());
}
@ -727,8 +729,11 @@ mod test {
panic!("Expected PrintConfigResult, got {ret:?}")
};
let expect_json =
std::fs::read_to_string("fixtures/print_config/ban_rules/expect.json").unwrap();
#[expect(clippy::disallowed_methods)]
let expect_json = std::fs::read_to_string("fixtures/print_config/ban_rules/expect.json")
.unwrap()
.replace("\r\n", "\n");
assert_eq!(config, expect_json.trim());
}