From ab6ac8943aae460fb1b988581bde4e425f378071 Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Sun, 17 Aug 2025 21:11:09 -0700 Subject: [PATCH] fixing windows tests --- src/baseline.rs | 7 +++++-- tests/smoke_baseline.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/baseline.rs b/src/baseline.rs index 4318fc4..adfab88 100644 --- a/src/baseline.rs +++ b/src/baseline.rs @@ -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 { diff --git a/tests/smoke_baseline.rs b/tests/smoke_baseline.rs index 1c53a0f..db3e250 100644 --- a/tests/smoke_baseline.rs +++ b/tests/smoke_baseline.rs @@ -108,4 +108,4 @@ fn baseline_exclude_prunes_entries() -> anyhow::Result<()> { assert!(!content.contains(".git/secret.txt")); Ok(()) -} +} \ No newline at end of file