From 25bb2abfc8e81f447261a2a7f073c0a79730d604 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 19 Nov 2026 05:36:53 -0800 Subject: [PATCH] Retype: the null more test adds a font so a new search is told apart When ten or fewer fonts match, adding more to the exhausted list returns the same list as a new search, so the null more assertion could not tell the two apart. The test now adds a font to the list before the null more call, and only a new search drops it. --- crates/ui-egui/src/panels/retype/tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/retype/tests.rs b/crates/ui-egui/src/panels/retype/tests.rs index 215a502a4a..49f067c0b2 100644 --- a/crates/ui-egui/src/panels/retype/tests.rs +++ b/crates/ui-egui/src/panels/retype/tests.rs @@ -97,7 +97,9 @@ fn more_adds_fonts_until_none_is_left() { } assert_eq!(last["more"], json!(false), "{last}"); assert_eq!(app.run("retype.find", json!({"more": true})).unwrap(), last, "nothing is left to add"); - // A null more is omitted: a new search lists the first ten again. + // A null more is omitted: a new search lists the first ten again. A font added to the list + // tells the new search apart from adding more when ten or fewer fonts match. + app.ui.retype.fonts.push(super::Found { family: "Not Found".into(), style: "Regular".into(), matched: 0 }); assert_eq!(app.run("retype.find", json!({"more": null})).unwrap(), first); // Before any search, more is a first search. app.run("retype.reset", json!({})).unwrap();