From 20f75c34e16358a0eb9f46c867a424f4a682d885 Mon Sep 17 00:00:00 2001 From: Felix Riestra Date: Mon, 21 Sep 2026 19:56:22 +0200 Subject: [PATCH] test: pass forward-slash temp paths to generated Python scripts On Windows the temp directory has backslashes, which a Python string literal reads as escape sequences (C:\Users is a unicode escape), so the RasterImage and OLE lifecycle tests could not even create their entity. Windows accepts forward slashes. Found by the first Windows run of the fork build workflow; Linux passed all 60. Co-Authored-By: Claude Sonnet 5 --- src/app/plugin_host.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/plugin_host.rs b/src/app/plugin_host.rs index 658990381..c59a841c9 100644 --- a/src/app/plugin_host.rs +++ b/src/app/plugin_host.rs @@ -5039,7 +5039,10 @@ mod tests { let _ = std::fs::remove_file(&path); }; - let tmp = std::env::temp_dir().to_string_lossy().into_owned(); + // Substituted into Python string literals: on Windows a backslash path such as + // `C:\Users\...` is read as escape sequences (`\U` is a unicode escape), and Windows + // accepts forward slashes, so hand the script a forward-slash path. + let tmp = std::env::temp_dir().to_string_lossy().replace('\\', "/"); let mut create_script = case.create.replace("TMPDIR", &tmp); // Insert is update-only: the host makes a block and one insert, and the // "create" script only has to exist.