summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2018-11-14 00:21:20 +0530
committerArun Isaac2018-11-14 00:21:20 +0530
commit2448f2500e04190206c27812475f83df08439d1b (patch)
tree3eb09e348c21f8ccb45b6779ab7ae3a0463982ae /tests
parent82c77e5659d7391bc7d3febca2a83e2c3beba648 (diff)
downloadguile-email-2448f2500e04190206c27812475f83df08439d1b.tar.gz
guile-email-2448f2500e04190206c27812475f83df08439d1b.tar.lz
guile-email-2448f2500e04190206c27812475f83df08439d1b.zip
tests: Add tests for email address parsing.
* tests/email.scm ("parse name-addr email address", "parse addr-spec email address", "parse emacs message mode parens style email address"): New tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/email.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/email.scm b/tests/email.scm
index f56baee..a91ab16 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -114,4 +114,16 @@ foo
foo
"))
+(test-equal "parse name-addr email address"
+ (parse-email-address "Foo <foo@example.org>")
+ '((name . "Foo") (address . "foo@example.org")))
+
+(test-equal "parse addr-spec email address"
+ (parse-email-address "foo@example.org")
+ '((address . "foo@example.org")))
+
+(test-equal "parse emacs message mode parens style email address"
+ (parse-email-address "foo@example.org (Foo)")
+ '((name . "Foo") (address . "foo@example.org")))
+
(test-end "email")