From 1fb55d4d654ec32903e7a1ed84530a5f3a0a38d6 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Tue, 11 Jun 2024 15:52:52 -0400 Subject: [PATCH] Add a test that shows that the local part is returned with Unicode NFC normalization s + U+0323 + U+0307 normalizes under NFC to U+1E69 (Latin Small Letter S With Dot Below And Dot Above) (https://www.unicode.org/reports/tr15/). We normalize when creating the returned email address info. --- tests/test_syntax.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_syntax.py b/tests/test_syntax.py index d4a9844..b150413 100644 --- a/tests/test_syntax.py +++ b/tests/test_syntax.py @@ -294,6 +294,16 @@ def test_email_valid(email_input: str, output: ValidatedEmail) -> None: normalized='ιωάννης@εεττ.gr', ), ), + ( + 's\u0323\u0307@nfc.tld', + MakeValidatedEmail( + local_part='\u1E69', + smtputf8=True, + ascii_domain='nfc.tld', + domain='nfc.tld', + normalized='\u1E69@nfc.tld', + ), + ), ], ) def test_email_valid_intl_local_part(email_input: str, output: ValidatedEmail) -> None: