From d532cc35ea6a6944bc4fa65e7e2557593502b1ce Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 5 Nov 2026 23:32:18 -0500 Subject: [PATCH] test(render): verify every printable ASCII glyph --- native/render/src/grid.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/native/render/src/grid.rs b/native/render/src/grid.rs index eac8d7a89..c9e79234d 100644 --- a/native/render/src/grid.rs +++ b/native/render/src/grid.rs @@ -253,9 +253,15 @@ mod tests { #[test] fn every_ascii_glyph_leaves_ink() { - let text: String = (0x21u32..=0x7e) - .map(|c| char::from_u32(c).unwrap()) - .collect(); - assert!(ink(&text) > 1000, "the printable ASCII range is covered"); + for codepoint in 0x20u32..=0x7e { + let glyph = char::from_u32(codepoint).unwrap(); + assert!( + bdf().glyphs.contains_key(&codepoint), + "the font lacks printable ASCII {glyph:?}" + ); + if glyph != ' ' { + assert!(ink(&glyph.to_string()) > 0, "{glyph:?} leaves no ink"); + } + } } } -- knotmirror 0.0.1