From 773a08330a79f5354c1b592e8913c700ac2f1501 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Tue, 27 Feb 2024 00:03:04 +0100 Subject: [PATCH] Attempt at fixing Windows test --- crates/uv/tests/pip_list.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/uv/tests/pip_list.rs b/crates/uv/tests/pip_list.rs index 5679bdcab..ec54ca1c1 100644 --- a/crates/uv/tests/pip_list.rs +++ b/crates/uv/tests/pip_list.rs @@ -521,6 +521,7 @@ fn format_json() -> Result<()> { let replace_whitespace = " ".repeat(57); let search_workspace = workspace_dir.as_str().strip_prefix(prefix).unwrap(); + let search_workspace_windows = search_workspace.replace("/", "\\/"); let replace_workspace = "[WORKSPACE_DIR]/"; let filters = INSTA_FILTERS @@ -528,6 +529,7 @@ fn format_json() -> Result<()> { .copied() .chain(vec![ (search_workspace, replace_workspace), + (search_workspace_windows.as_str(), replace_workspace), (find_divider.as_str(), replace_divider.as_str()), (find_header.as_str(), replace_header.as_str()), (find_whitespace.as_str(), replace_whitespace.as_str()),