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"); + } + } } }