summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/email.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/email.scm b/tests/email.scm
index 530cb8b..8aa9082 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -282,6 +282,21 @@ foo
foo
" "utf-8")))
+(test-equal "tolerate non-ascii characters in headers"
+ (parse-email
+ (string->bytevector
+ "From: foo@bar.org (Foo Bãr)
+
+body" "utf-8"))
+ (make-email
+ `((content-type (type . text)
+ (subtype . plain)
+ (charset . "utf-8"))
+ (content-transfer-encoding . 7bit)
+ (from ((name . "Foo Bãr")
+ (address . "foo@bar.org"))))
+ "body"))
+
(test-equal "parse name-addr email address"
(parse-email-address "Foo <foo@example.org>")
'((name . "Foo") (address . "foo@example.org")))