[tests] Diff: the differential suite runs on Windows too (Windows Caddy, drive paths), with two branch previews in the fixtures; edge leaves a websocket 101 as the upstream sent it, as Caddy does

This commit is contained in:
2026-11-17 13:59:18 +01:00
parent acf69a8ed2
commit 5e273241e4
6 changed files with 114 additions and 25 deletions
+6 -1
View File
@@ -126,8 +126,13 @@ pub fn find_binary(name: &str) -> Option<PathBuf> {
return Some(PathBuf::from(p));
}
let path = std::env::var_os("PATH")?;
let file = if cfg!(windows) {
format!("{name}.exe")
} else {
name.to_owned()
};
std::env::split_paths(&path)
.map(|d| d.join(name))
.map(|d| d.join(&file))
.find(|p| p.is_file())
}