chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

39
vendor/chrono/tests/win_bindings.rs vendored Normal file
View File

@@ -0,0 +1,39 @@
use std::fs;
use windows_bindgen::bindgen;
#[test]
fn gen_bindings() {
let existing = fs::read_to_string(BINDINGS).unwrap();
bindgen([
"--out",
BINDINGS,
"--flat",
"--no-comment",
"--no-deps",
"--sys",
"--filter",
"GetTimeZoneInformationForYear",
"SystemTimeToFileTime",
"SystemTimeToTzSpecificLocalTime",
"TzSpecificLocalTimeToSystemTime",
])
.unwrap();
// Check the output is the same as before.
// Depending on the git configuration the file may have been checked out with `\r\n` newlines or
// with `\n`. Compare line-by-line to ignore this difference.
let mut new = fs::read_to_string(BINDINGS).unwrap();
if existing.contains("\r\n") && !new.contains("\r\n") {
new = new.replace("\n", "\r\n");
} else if !existing.contains("\r\n") && new.contains("\r\n") {
new = new.replace("\r\n", "\n");
}
similar_asserts::assert_eq!(existing, new);
if !new.lines().eq(existing.lines()) {
panic!("generated file `{BINDINGS}` is changed.");
}
}
const BINDINGS: &str = "src/offset/local/win_bindings.rs";