WIP: RFC5322, actually almost everything works!
This commit is contained in:
parent
ff455bce71
commit
b77f219c40
@ -281,7 +281,7 @@ domain_literal = do _ <- tryMaybe cfws
|
||||
_ <- tryMaybe fws
|
||||
_ <- char ']'
|
||||
_ <- tryMaybe cfws
|
||||
pure $ A.fold xs
|
||||
pure $ "[" <> A.fold xs <> "]"
|
||||
|
||||
-- | dtext: characters in domains.
|
||||
-- |
|
||||
|
@ -80,3 +80,6 @@ main = do
|
||||
|
||||
log ""
|
||||
test_series "E.email" E.email id showerror_email T.valid_email_addresses
|
||||
|
||||
log ""
|
||||
test_series "E.address (short)" E.address id showerror_email T.valid_email_addresses_short
|
||||
|
@ -44,6 +44,27 @@ ipv6_addresses
|
||||
, "2001:0db8::8a2e:0370:7334"
|
||||
]
|
||||
|
||||
valid_email_addresses_short :: Array String
|
||||
valid_email_addresses_short
|
||||
= [ """simple@example.com"""
|
||||
, """very.common@example.com"""
|
||||
, """x@example.com """
|
||||
, """long.email-address-with-hyphens@and.subdomains.example.com"""
|
||||
, """user.name+tag+sorting@example.com """
|
||||
, """name/surname@example.com """
|
||||
, """admin@example """
|
||||
, """example@s.example """
|
||||
, """" "@example.org """
|
||||
, """"john..doe"@example.org """
|
||||
, """mailhost!username@example.org """
|
||||
, """"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com """
|
||||
, """user%example.com@example.org """
|
||||
, """user-@example.org """
|
||||
, """postmaster@[123.123.123.123] """
|
||||
, """postmaster@[IPv6:2001:0db8:85a3:0000:0000:8a2e:0370:7334] """
|
||||
, """_test@[IPv6:2001:0db8:85a3:0000:0000:8a2e:0370:7334] """
|
||||
]
|
||||
|
||||
valid_email_addresses :: Array String
|
||||
valid_email_addresses
|
||||
= [ """simple@example.com"""
|
||||
|
Loading…
Reference in New Issue
Block a user