From a673fcaa1acc61cdc677014af03aef2f79183e3a Mon Sep 17 00:00:00 2001 From: mavrick Date: Thu, 26 Nov 2026 11:20:29 -0600 Subject: [PATCH] test(layout): a wrapped map title is checked where its names wrap a_wrapped_map_title_is_sized_for_its_drawn_lines (#2972) picks names that wrap in the Linux interface fonts. On macOS and Windows a narrower font fits the classic title on one line, so the test failed there and on main's push runs. Linux still requires each title to wrap; elsewhere a title that fits on one line has no lines to size and is skipped. --- crates/engine/src/tests/layout_title.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/tests/layout_title.rs b/crates/engine/src/tests/layout_title.rs index 5b2dd87afc..aa8dca299c 100644 --- a/crates/engine/src/tests/layout_title.rs +++ b/crates/engine/src/tests/layout_title.rs @@ -158,7 +158,13 @@ fn a_wrapped_map_title_is_sized_for_its_drawn_lines() { for (li, (style, pad, name)) in cases.into_iter().enumerate() { s.run("map.rename", &json!({"name": name})).unwrap(); s.run("layout.publication", &json!({"profile": "a4-portrait", "extent": extent, "title": "{map}", "style": style})).unwrap(); - assert!(wraps(&s, li, "Title"), "{style}"); + // The names wrap in the Linux interface fonts; macOS and Windows fonts may fit one on a + // line, which leaves nothing to size. + if cfg!(target_os = "linux") { + assert!(wraps(&s, li, "Title"), "{style}"); + } else if !wraps(&s, li, "Title") { + continue; + } let lines = drawn_lines(&s, li, "Title"); assert_eq!(sized_lines(&s, li, "Title", pad), lines.len(), "{style}: {lines:?}"); }