From 7ea018b4f62845eff1f85d67f7473e7d2fcb5f9b Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Fri, 4 Dec 2026 05:48:47 +0100 Subject: [PATCH] test: compare the canonical Windows batch output path (#9278) Co-authored-by: FredApps --- crates/automation/src/batch.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/automation/src/batch.rs b/crates/automation/src/batch.rs index 5fa5e28596..22eb3b158f 100644 --- a/crates/automation/src/batch.rs +++ b/crates/automation/src/batch.rs @@ -423,8 +423,10 @@ mod tests { let Some(log) = result.get("log").and_then(|value| value.as_str()) else { panic!("batch result should carry a plain-text per-file log: {result}"); }; - let out_escaped = out_str.replace('\\', "\\\\"); - assert!(log.contains(&out_escaped), "log should name the published output: {log}"); + let published = out_dir.path().join("good.pdf").canonicalize().expect("published output"); + let published = published.to_str().expect("published path is UTF-8"); + let out_escaped = published.replace('\\', "\\\\").replace('\r', "\\r").replace('\n', "\\n"); + assert!(log.contains(&format!(": ok: output: {out_escaped} steps:")), "log should name the published output: {log}"); assert!(log.contains("optimize"), "log should report the successful step result: {log}"); assert!(log.contains("ok"), "log should mark the successful file: {log}"); let lower = log.to_ascii_lowercase();