mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 09:36:45 +00:00
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.
This commit is contained in:
@@ -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<String> = 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user