LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Batch 32: close the tests two merges added at one place; cargo fmt
bflatastic702f90bfc93b
diff --git a/crates/engine/src/files.rs b/crates/engine/src/files.rsindex ee17ee735..dc79b8b31 100644--- a/crates/engine/src/files.rs+++ b/crates/engine/src/files.rs@@ -1293,6 +1293,8 @@ mod tests {let (_, window, read) = preview_window(&path).expect("the file reads").expect("sRGB is what the JPEG-only decode assumes");assert!(read.planned, "the plan still answers");assert!(window.starts_with(&[0xff, 0xd8]), "and hands on the JPEG");+ }+/// A JPEG with no date in its metadata (an export saved without it) takes the file's date, as/// in Lightroom, instead of grouping under "Unknown Date"; a dated one keeps its capture time.#[test]diff --git a/crates/preview/src/tests.rs b/crates/preview/src/tests.rsindex 2aa5ce310..3179b91ec 100644--- a/crates/preview/src/tests.rs+++ b/crates/preview/src/tests.rs@@ -391,6 +391,8 @@ fn pool_wait_keeps_the_finished_job_for_try_recv() {assert!(p.wait(std::time::Duration::ZERO), "kept until taken");assert_eq!(p.try_recv().map(|d| d.result), Some(7));assert!(p.try_recv().is_none());+}+/// Wait up to `secs` for `f` to hold.fn eventually(secs: u64, mut f: impl FnMut() -> bool) -> bool {let t0 = std::time::Instant::now();diff --git a/crates/ui-egui/src/tests_panels.rs b/crates/ui-egui/src/tests_panels.rsindex 486819712..440621346 100644--- a/crates/ui-egui/src/tests_panels.rs+++ b/crates/ui-egui/src/tests_panels.rs@@ -2273,6 +2273,8 @@ fn an_album_menu_imports_into_that_album() {assert_eq!(r["result"]["scanning"], true, "{r}");assert_eq!(review_album(&mut h), None);let _ = std::fs::remove_dir_all(&dir);+}+/// Delete asks before photos go to Recently Deleted, by default and from every way in: the key, the/// Photo menu and a photo's right-click menu (#1239). With the setting off, it deletes at once.#[test]@@ -2313,6 +2315,8 @@ fn deleting_a_photo_asks_first_from_the_key_the_menu_and_the_right_click_menu()click(&mut h, "button:contextDeletePhoto");assert_eq!(h.app.ui.dialog, None);assert!(deleted(&h));+}+/// New Album's "Include selected photos" (as in Lightroom): on by default; unticked, the new album/// starts empty; with nothing selected the option isn't shown, and a folder never has it.#[test]