From d11ad80dee669c5e2285ca8df8ebc99abc031ccd Mon Sep 17 00:00:00 2001 From: evie <50974538+mi2ebi@users.noreply.github.com> Date: Tue, 25 Feb 2025 06:01:01 -0800 Subject: Add `#str.normalize(form)` (#5631) Co-authored-by: +merlan #flirora Co-authored-by: Laurenz --- tests/suite/foundations/str.typ | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/suite') diff --git a/tests/suite/foundations/str.typ b/tests/suite/foundations/str.typ index 56756416..66fb912c 100644 --- a/tests/suite/foundations/str.typ +++ b/tests/suite/foundations/str.typ @@ -86,6 +86,13 @@ // Error: 2-28 0x110000 is not a valid codepoint #str.from-unicode(0x110000) // 0x10ffff is the highest valid code point +--- str-normalize --- +// Test the `normalize` method. +#test("e\u{0301}".normalize(form: "nfc"), "é") +#test("é".normalize(form: "nfd"), "e\u{0301}") +#test("ſ\u{0301}".normalize(form: "nfkc"), "ś") +#test("ſ\u{0301}".normalize(form: "nfkd"), "s\u{0301}") + --- string-len --- // Test the `len` method. #test("Hello World!".len(), 12) -- cgit v1.2.3