aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2020-12-04 23:14:06 +0530
committerArun Isaac2020-12-04 23:14:06 +0530
commit907a5d678c58eff653133df441aeecd3b7025e37 (patch)
tree5cebe7f80ce6ce9e64faf3ba7d334f4fe42dcaee
parentce54bf23d143e030f7547223d3fe56b598e636ca (diff)
downloadguile-email-907a5d678c58eff653133df441aeecd3b7025e37.tar.gz
guile-email-907a5d678c58eff653133df441aeecd3b7025e37.tar.lz
guile-email-907a5d678c58eff653133df441aeecd3b7025e37.zip
tests: Parse email addresses with period in name.
* tests/email.scm ("parse email addresses with period in name"): New test. Reported-by: Ricardo Wurmus <rekado@elephly.net>
-rw-r--r--tests/email.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/email.scm b/tests/email.scm
index acf1b8a..a2b6361 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -1,6 +1,6 @@
;;; guile-email --- Guile email parser
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019, 2020 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file was adapted from guile-debbugs and is part of guile-email.
;;;
@@ -410,6 +410,12 @@ copyright =A9")
(parse-email-address "foo@example.org (Foo)")
'((name . "Foo") (address . "foo@example.org")))
+(test-expect-fail "parse email addresses with period in name")
+
+(test-equal "parse email addresses with period in name"
+ (parse-email-address "Foo P. Bar <foo@example.com>")
+ '((name . "Foo P. Bar") (address . "foo@example.com")))
+
(test-equal "decode MIME encoded word: wikipedia example"
((module-ref (resolve-module '(email email))
'decode-mime-encoded-word)