From 8ea3c638d2301a29c88388d34656c9e57dc7ff9f Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sun, 8 Nov 2026 23:38:58 +0700 Subject: [PATCH] OCR file-job test compares what was read, not the save's timestamp a_file_job_reads_in_two_halves compared the two saves' bytes, which carry the modification time, so it failed when the saves landed a second apart. --- crates/engine/src/ocr.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/ocr.rs b/crates/engine/src/ocr.rs index 2977406bdf..cb31e3b550 100644 --- a/crates/engine/src/ocr.rs +++ b/crates/engine/src/ocr.rs @@ -1857,7 +1857,9 @@ mod tests { let pages = file.job.take().unwrap().run(&r, |_, _| true); let out = file.finish(pages).unwrap(); assert_eq!((fake.calls(), out.words(), out.file_skipped.clone()), (1, 1, None)); - assert_eq!(out, recognize_file("t.pdf", bytes, None, force, &r, |_, _| true).unwrap(), "the same as reading it in one call"); + let whole = recognize_file("t.pdf", bytes, None, force, &r, |_, _| true).unwrap(); + // The saved bytes carry a modification time, so two saves a second apart differ there alone. + assert_eq!((out.pages, out.file_skipped), (whole.pages, whole.file_skipped), "the same as reading it in one call"); } /// Two inputs of one name (from different folders, or differing only in case) would