aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/email.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/email.scm b/tests/email.scm
index a91ab16..a2a38df 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -126,4 +126,16 @@ foo
(parse-email-address "foo@example.org (Foo)")
'((name . "Foo") (address . "foo@example.org")))
+(test-equal "decode MIME encoded word: wikipedia example"
+ ((module-ref (resolve-module '(email email))
+ 'decode-mime-encoded-word)
+ "=?iso-8859-1?Q?=A1Hola,_se=F1or!?=")
+ "¡Hola, señor!")
+
+(test-equal "decode MIME encoded phrases that mix ASCII text and MIME encoded words"
+ ((module-ref (resolve-module '(email email))
+ 'decode-mime-encoded-word)
+ "Foo =?UTF-8?Q?B=C3=A3r?=")
+ "Foo Bãr")
+
(test-end "email")