From 3116c10183468babbf557f96c3b6a1d8ce45dd9c Mon Sep 17 00:00:00 2001 From: giswqs Date: Wed, 4 Nov 2026 14:43:34 -0500 Subject: [PATCH] test(engine): compare export answers with Windows paths escaped as JSON exports_run_on_another_thread (#1433) failed on Windows x64 and ARM64: it replaced the export path in the answer's JSON text, where a Windows path's backslashes are escaped, so the path never matched and the answers still differed by file name. Replace the path as JSON spells it. --- crates/engine/src/tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 2c91819b5..0e237b672 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -27255,7 +27255,11 @@ fn exports_run_on_another_thread() { assert!(s.notices_since(mark).is_empty(), "{command}: nothing is said before it lands"); let answer_there = export_land(&mut s, wrote); assert_eq!(said(&s, mark, &there), said_here, "{command} {file}"); - let unpathed = |v: &Value, path: &str| v.to_string().replace(path, "PATH"); + // The path as it appears in JSON: on Windows its backslashes are escaped there. + let unpathed = |v: &Value, path: &str| { + let escaped = json!(path).to_string(); + v.to_string().replace(escaped.trim_matches('"'), "PATH") + }; assert_eq!(unpathed(&answer_there, &there), unpathed(&answer_here, &here), "{command} {file}"); // A GeoPackage holds the time it was written: its features are compared instead. if file.ends_with(".gpkg") {