From 7d37087d8f84661a3c6ecda4e95997d9d77f9e8d Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 6 Dec 2020 10:19:10 +0530 Subject: 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. --- tests/email.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 -- cgit v1.2.3