aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2019-12-21 22:57:37 +0530
committerArun Isaac2019-12-21 22:57:37 +0530
commitd162521a23eb9e5c1cf78e8b20b086190329b3d6 (patch)
tree7e9abfce6343246e4631d2b37f193fdd4756ddae
parent6aad0d64c92d090df951dbe363edb24f9a7afc26 (diff)
downloadguile-email-d162521a23eb9e5c1cf78e8b20b086190329b3d6.tar.gz
guile-email-d162521a23eb9e5c1cf78e8b20b086190329b3d6.tar.lz
guile-email-d162521a23eb9e5c1cf78e8b20b086190329b3d6.zip
tests: Return References header with only one reference as a singleton list.
* tests/email.scm ("References header with only one reference must be a singleton list, not a string"): New test.
-rw-r--r--tests/email.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/email.scm b/tests/email.scm
index 23daffa..acf1b8a 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -384,6 +384,20 @@ copyright =A9")
(subtype . plain)
(charset . "utf-8"))
(content-transfer-encoding . 7bit)))
+
+(test-expect-fail
+ "References header with only one reference must be a singleton list, not a string")
+
+(test-alist= "References header with only one reference must be a singleton list, not a string"
+ (parse-email-headers
+ "References: <foo@bar.org>
+")
+ '((references . ("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")))