From 54df9c684e224a2c1d71915e2f06946ef7362fdb Mon Sep 17 00:00:00 2001 From: Evan Rutledge Borden Date: Tue, 5 May 2020 16:56:26 -0500 Subject: [PATCH] Introduce a failing test for dotless domain ICANN has prohibited dotless domain names: https://www.icann.org/news/announcement-2013-08-30-en While these are technically possible in the spec, they have effectively been made invalid. email-validate will accept these domains in its current form, when it should mark them as invalid. --- tests/Main.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Main.hs b/tests/Main.hs index e59688c..cc11393 100644 --- a/tests/Main.hs +++ b/tests/Main.hs @@ -161,6 +161,7 @@ examples = let domain249 = BS.intercalate "." (take 25 (repeat (BS.replicate 9 'x'))) in [ valid "first.last@example.com" , valid "first.last@example.com." `why` "Dot allowed on end of domain" + , invalid "first.last@examplecom" `why` "Domain part does not contain a dot, per ICANN https://www.icann.org/news/announcement-2013-08-30-en" , invalid "local@exam_ple.com" `why` "Underscore not permitted in domain" , valid "1234567890123456789012345678901234567890123456789012345678901234@example.com" , valid "\"first last\"@example.com" `why` "Contains quoted spaces"