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

6
vendor/hostname/tests/bindings.txt vendored Normal file
View File

@@ -0,0 +1,6 @@
--out src/windows/bindings.rs
--flat --sys --no-comment
--filter
ComputerNamePhysicalDnsHostname
GetComputerNameExW
SetComputerNameExW

33
vendor/hostname/tests/codegen.rs vendored Normal file
View File

@@ -0,0 +1,33 @@
use std::fs;
use std::process::Command;
use windows_bindgen::bindgen;
#[test]
fn gen_bindings() {
let output = "src/windows/bindings.rs";
let existing = fs::read_to_string(output).unwrap();
bindgen(["--no-deps", "--etc", "tests/bindings.txt"]).unwrap();
let out = Command::new("rustfmt")
.arg("--edition=2021")
.arg(output)
.output()
.unwrap();
dbg!(String::from_utf8(out.stdout).unwrap());
dbg!(String::from_utf8(out.stderr).unwrap());
assert!(out.status.success());
// 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(output).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);
}

9
vendor/hostname/tests/version.rs vendored Normal file
View File

@@ -0,0 +1,9 @@
#[test]
fn test_readme_deps() {
version_sync::assert_markdown_deps_updated!("README.md");
}
#[test]
fn test_html_root_url() {
version_sync::assert_html_root_url_updated!("src/lib.rs");
}