From 2448f2500e04190206c27812475f83df08439d1b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 14 Nov 2018 00:21:20 +0530 Subject: 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. --- tests/email.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/email.scm') 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 ") + '((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") -- cgit v1.2.3