fixing windows tests

This commit is contained in:
Mick Grove 2025-08-17 21:11:09 -07:00
commit ab6ac8943a
2 changed files with 6 additions and 3 deletions

View file

@ -46,11 +46,14 @@ fn normalize_path(p: &Path, roots: &[PathBuf]) -> String {
for root in roots {
if let Ok(stripped) = p.strip_prefix(root) {
if let Some(name) = root.file_name() {
return PathBuf::from(name).join(stripped).to_string_lossy().into();
return PathBuf::from(name)
.join(stripped)
.to_string_lossy()
.replace('\\', "/");
}
}
}
p.to_string_lossy().into()
p.to_string_lossy().replace('\\', "/")
}
fn compute_hash(secret: &str, path: &str) -> String {

View file

@ -108,4 +108,4 @@ fn baseline_exclude_prunes_entries() -> anyhow::Result<()> {
assert!(!content.contains(".git/secret.txt"));
Ok(())
}
}