mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
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 <[email protected]> Model-Effort: Opus 5.5 driver, no subagent
This commit is contained in:
1 parent
61dc2216c6
commit
6fa1c373c3
1 file changed
+3
-1
@@ -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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user