summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2020-12-06 10:19:10 +0530
committerArun Isaac2020-12-06 10:19:10 +0530
commit7d37087d8f84661a3c6ecda4e95997d9d77f9e8d (patch)
treebd7b1e4050f3a01aa53a8d732bd10211c9673a0e
parent0a523ab46dc43dc1659bfbf079b2feea58eae2b9 (diff)
downloadguile-email-7d37087d8f84661a3c6ecda4e95997d9d77f9e8d.tar.gz
guile-email-7d37087d8f84661a3c6ecda4e95997d9d77f9e8d.tar.lz
guile-email-7d37087d8f84661a3c6ecda4e95997d9d77f9e8d.zip
tests: Return a list of Received headers for trace.
* tests/email.scm ("Trace with only one Received header should be a
list of received traces, not a single received trace"): 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 0d93876..83ef91f 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -481,6 +481,20 @@ copyright =A9")
                   (charset . "utf-8"))
     (content-transfer-encoding . 7bit)))
 
+(test-expect-fail
+ "Trace with only one Received header should be a list of received traces, not a single received trace")
+
+(test-alist= "Trace with only one Received header should be a list of received traces, not a single received trace"
+  (parse-email-headers
+   "Received: by foo.bar.com id ZZZ55555; Thu, 31 May 2001 16:38:04 -1000 (HST)
+")
+  `((trace (received "by foo.bar.com id ZZZ55555"
+                     ,(make-date 0 4 38 16 31 5 2001 -36000)))
+    (content-type (type . text)
+                  (subtype . plain)
+                  (charset . "utf-8"))
+    (content-transfer-encoding . 7bit)))
+
 (test-alist= "Parse obsolete Received header"
   (parse-email-headers
    "Received: by foo.bar.com id ZZZ55555