From 9973247dfc5e7f042d151abe058f2c5669ac05ba Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 16 Nov 2026 06:00:19 -0800 Subject: [PATCH] Type: test that Show Similar Fonts puts a family without numbers first when asked about it The test now lists that family last, so it passes only when the family asked about is moved to the front and the others keep their order. --- crates/text/src/tests/similar.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/text/src/tests/similar.rs b/crates/text/src/tests/similar.rs index 6f2dbc3ae9..cbed73d7c4 100644 --- a/crates/text/src/tests/similar.rs +++ b/crates/text/src/tests/similar.rs @@ -140,7 +140,8 @@ fn a_family_without_numbers_comes_after_the_measured_ones() { // The measured families keep the order they have without it. let measured: Vec = order.iter().filter(|f| *f != NUMBERLESS_FAMILY).cloned().collect(); assert_eq!(measured, db.similar_families("Source Sans 3", &families[1..])); - // Asked about itself, it comes first, and the families it shares no number with keep their - // order in the list. - assert_eq!(db.similar_families(NUMBERLESS_FAMILY, &families), families); + // Asked about itself, it comes first even from the end of the list, and the families it shares + // no number with keep their order in the list. + let last = names(&["JetBrains Mono", "Source Serif 4", "Inter", HEIGHTLESS_FAMILY, "Source Sans 3", NUMBERLESS_FAMILY]); + assert_eq!(db.similar_families(NUMBERLESS_FAMILY, &last), families); }