mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-09 04:22:20 +00:00
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.
This commit is contained in:
1 parent
6bc6d80279
commit
8ea3c638d2
1 file changed
+3
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user