aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2021-10-24 02:57:18 +0530
committerArun Isaac2021-10-24 02:57:18 +0530
commit9d2c3b593a583eff3a1aa4ce95808644bb0b54ae (patch)
tree3984446b12639304b35f45fc1387e83d10670471
parent86f0af337b3d4c8afc075c09a1aae4b1694d9ebd (diff)
downloadguile-email-9d2c3b593a583eff3a1aa4ce95808644bb0b54ae.tar.gz
guile-email-9d2c3b593a583eff3a1aa4ce95808644bb0b54ae.tar.lz
guile-email-9d2c3b593a583eff3a1aa4ce95808644bb0b54ae.zip
tests: Return trace with only one Receieved header as a list of lists.
* tests/email.scm ("Trace with only one Received header must be a list of lists, not a list"): 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 50625f1..f283e71 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -533,6 +533,20 @@ Content-Type: text/plain; charset=utf-8
(subtype . octet-stream))
(content-transfer-encoding . binary)))
+(test-expect-fail
+ "Trace with only one Received header must be a list of lists, not a list")
+
+(test-alist= "Trace with only one Received header must be a list of lists, not a list"
+ (parse-email-headers
+ "Received: from foo; Sun, 24 Jan 2021 13:45:20 -0500
+")
+ `((trace (received "from foo"
+ ,(make-date 0 20 45 13 24 1 2021 -18000)))
+ (content-type (type . text)
+ (subtype . plain)
+ (charset . "utf-8"))
+ (content-transfer-encoding . 7bit)))
+
;;;
;;; Email addresses