diff options
Diffstat (limited to 'tests/email.scm')
-rw-r--r-- | tests/email.scm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/email.scm b/tests/email.scm index 8aa9082..1346b20 100644 --- a/tests/email.scm +++ b/tests/email.scm @@ -282,7 +282,7 @@ foo foo " "utf-8"))) -(test-equal "tolerate non-ascii characters in headers" +(test-equal "decode utf-8 characters in headers" (parse-email (string->bytevector "From: foo@bar.org (Foo Bãr) @@ -297,6 +297,21 @@ body" "utf-8")) (address . "foo@bar.org")))) "body")) +(test-equal "tolerate non-ascii non-utf-8 characters in headers" + (parse-email + (string->bytevector + "From: foo@bar.org (Foo Bãr) + +body" "iso-8859-1")) + (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"))) |