From ea2e0a0e10096b6c6918a2357ff6a520969b2e10 Mon Sep 17 00:00:00 2001 From: mtlcl410 Date: Sat, 7 Nov 2026 19:17:57 +0800 Subject: [PATCH] test(fonts): the `u` glyph-name form reads with four, five and six digits (hayro-interpret patch 92) The test of the glyph list's hex forms now has well-formed `u` names too, so a change that broke that branch of `glyph_text` would fail it. The rule itself is unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA --- crates/fonts/src/pdf.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/fonts/src/pdf.rs b/crates/fonts/src/pdf.rs index 3ee5a06dd6..cd5deb4c2d 100644 --- a/crates/fonts/src/pdf.rs +++ b/crates/fonts/src/pdf.rs @@ -1373,6 +1373,9 @@ mod encoding_tests { assert_eq!(glyph_text("u65"), None, "`u` takes four to six digits"); assert_eq!(glyph_text("u0010FFFF"), None); assert_eq!(glyph_text("uni0065").as_deref(), Some("e")); + assert_eq!(glyph_text("u0065").as_deref(), Some("e"), "`u` and four digits"); + assert_eq!(glyph_text("u1F600").as_deref(), Some("\u{1f600}"), "`u` and five"); + assert_eq!(glyph_text("u10FFFF").as_deref(), Some("\u{10ffff}"), "`u` and six, the last code point"); } #[test]