LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust
Tests: neutral example names in file-path and long-name fixtures
Nathaniel Ledford872bff96ea7a
diff --git a/crates/catalog/src/rules.rs b/crates/catalog/src/rules.rsindex 675094f96..9cea37f0d 100644--- a/crates/catalog/src/rules.rs+++ b/crates/catalog/src/rules.rs@@ -1012,14 +1012,14 @@ mod tests {yes(json!({"rules": [{"field": "fileName", "op": "startsWith", "value": "img_"}, {"field": "fileName", "op": "endsWith", "value": ".cr2"}]}));// file path: the whole string (spaces included), either separator, case-insensitivelet mut fp = photo(3);- fp.source = Source::File { path: "D:\\Photos\\Aliah Ira Polanco-Grylls\\2026\\IMG_0042.CR2".into() };+ fp.source = Source::File { path: "D:\\Photos\\Lake Como Wedding-Day\\2026\\IMG_0042.CR2".into() };let fpm = |v: serde_json::Value| rs(v).matches(&fp, &cat);- assert!(fpm(json!({"rules": [{"field": "filePath", "op": "contains", "value": "/Aliah Ira Polanco-Grylls/"}]})));- assert!(!fpm(json!({"rules": [{"field": "filePath", "op": "contains", "value": "/Ira Aliah/"}]})));- assert!(!fpm(json!({"rules": [{"field": "filePath", "op": "contains", "value": "Polanco Grylls"}]})));+ assert!(fpm(json!({"rules": [{"field": "filePath", "op": "contains", "value": "/Lake Como Wedding-Day/"}]})));+ assert!(!fpm(json!({"rules": [{"field": "filePath", "op": "contains", "value": "/Como Lake/"}]})));+ assert!(!fpm(json!({"rules": [{"field": "filePath", "op": "contains", "value": "Wedding Day"}]})));assert!(fpm(json!({"rules": [{"field": "filePath", "op": "notContains", "value": "/Other/"}]})));assert!(fpm(json!({"rules": [{"field": "filePath", "op": "startsWith", "value": "d:/photos/"}]})));- no(json!({"rules": [{"field": "filePath", "op": "contains", "value": "/Aliah/"}]})); // demo photo has no path+ no(json!({"rules": [{"field": "filePath", "op": "contains", "value": "/Lake/"}]})); // demo photo has no pathyes(json!({"rules": [{"field": "filePath", "op": "isEmpty"}]}));yes(json!({"rules": [{"field": "camera", "op": "contains", "value": "x2"}, {"field": "title", "op": "isEmpty"}]}));yes(json!({"rules": [{"field": "iso", "op": "between", "value": [800, 3200]}, {"field": "aperture", "op": "lte", "value": "f/4"}]}));diff --git a/crates/ui-egui/src/tests_panels.rs b/crates/ui-egui/src/tests_panels.rsindex 66eb360e1..d45b9976e 100644--- a/crates/ui-egui/src/tests_panels.rs+++ b/crates/ui-egui/src/tests_panels.rs@@ -991,7 +991,7 @@ fn tooltip_shown(h: &Headless) -> bool {h.view.ctx.memory(|m| m.areas().visible_layer_ids().into_iter().any(|l| l.order == egui::Order::Tooltip))}-const LONG_NAME: &str = "Aliah Ira Polanco-Grylls and a name much longer than any sidebar row can show";+const LONG_NAME: &str = "Lake Como Wedding-Day and a name much longer than any sidebar row can show";/// A name never runs past the photo count: it is cut with an ellipsis, in full on hover.#[test]