From 0a523ab46dc43dc1659bfbf079b2feea58eae2b9 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 6 Dec 2020 10:17:54 +0530 Subject: tests: Parse obsolete Received header. * tests/email.scm ("Parse obsolete Received header"): New test. --- tests/email.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/email.scm b/tests/email.scm index ac60f0e..0d93876 100644 --- a/tests/email.scm +++ b/tests/email.scm @@ -481,6 +481,18 @@ copyright =A9") (charset . "utf-8")) (content-transfer-encoding . 7bit))) +(test-alist= "Parse obsolete Received header" + (parse-email-headers + "Received: by foo.bar.com id ZZZ55555 +Received: from zzz ([1.2.3.5]) by ooo.ooo.com with Maccrosoft SMTPSVC(5.5.1877.197.19) +") + '((trace (received "by foo.bar.com id ZZZ55555") + (received "from zzz by ooo.ooo.com with Maccrosoft SMTPSVC")) + (content-type (type . text) + (subtype . plain) + (charset . "utf-8")) + (content-transfer-encoding . 7bit))) + (test-equal "parse name-addr email address" (parse-email-address "Foo ") '((name . "Foo") (address . "foo@example.org"))) -- cgit v1.2.3