diff options
author | Arun Isaac | 2021-03-15 01:51:43 +0530 |
---|---|---|
committer | Arun Isaac | 2021-03-15 01:55:11 +0530 |
commit | ca0520a33c9042a68691d85c6849f88412ca8357 (patch) | |
tree | 514701b909d8138a274211186b32fcfc673db0ed /tests | |
parent | 03e9cacb826bd4a56d3d834fe5526e497d7c57eb (diff) | |
download | guile-email-ca0520a33c9042a68691d85c6849f88412ca8357.tar.gz guile-email-ca0520a33c9042a68691d85c6849f88412ca8357.tar.lz guile-email-ca0520a33c9042a68691d85c6849f88412ca8357.zip |
email: Use only cfws-captured-words in obs-phrase.
* email/email.scm (obs-phrase): Replace word with cfws-captured-word.
* tests/email.scm ("Parse names with more than two words"): New test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/email.scm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/email.scm b/tests/email.scm index 83ef91f..469389a 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, 2020 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2018, 2019, 2020, 2021 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file was adapted from guile-debbugs and is part of guile-email. ;;; @@ -507,6 +507,17 @@ Received: from zzz ([1.2.3.5]) by ooo.ooo.com with Maccrosoft SMTPSVC(5.5.1877. (charset . "utf-8")) (content-transfer-encoding . 7bit))) +(test-alist= "Parse names with more than two words" + (parse-email-headers + "From: Foo Bar Foobar <foo@bar.org> +") + `((from ((name . "Foo Bar Foobar") + (address . "foo@bar.org"))) + (content-type (type . text) + (subtype . plain) + (charset . "utf-8")) + (content-transfer-encoding . 7bit))) + (test-equal "parse name-addr email address" (parse-email-address "Foo <foo@example.org>") '((name . "Foo") (address . "foo@example.org"))) |