From 6fa1c373c360255236bfa1235aa560e045aab3a7 Mon Sep 17 00:00:00 2001 From: Trevor Brown Date: Sun, 15 Nov 2026 16:54:05 -0500 Subject: [PATCH] Batch stop-on-error test: check the error log's whole File path, then the Error line (#13665) Co-Authored-By: Claude Opus 5.5 Model-Effort: Opus 5.5 driver, no subagent --- crates/engine/src/cmd/file_cmds/tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/file_cmds/tests.rs b/crates/engine/src/cmd/file_cmds/tests.rs index 83e2e1fc44..2ffb464bee 100644 --- a/crates/engine/src/cmd/file_cmds/tests.rs +++ b/crates/engine/src/cmd/file_cmds/tests.rs @@ -896,7 +896,9 @@ fn batch_stop_on_error_reports_skipped_inputs_and_writes_the_error_log() { assert_eq!(result["stopped"], json!(missing), "{result}"); assert_eq!(result["skipped"], json!([good]), "{result}"); let text = batch_log(&log); - assert!(text.starts_with("Start Batch\r\n\r\n") && text.contains("missing.png") && text.contains("File: \"") && text.contains("Error: "), "{text}"); + // The whole path as given, in the platform's separators (`native_separators`), then the error. + let file = if cfg!(windows) { missing.replace('/', "\\") } else { missing.clone() }; + assert!(text.starts_with("Start Batch\r\n\r\n") && text.contains(&format!("File: \"{file}\"\r\nError: ")), "{text}"); assert!(text.ends_with("End Batch\r\n"), "{text}"); assert!(!std::path::Path::new(&join(&output, "good.png")).exists()); }