aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2020-12-05 20:14:54 +0530
committerArun Isaac2020-12-05 20:14:54 +0530
commit19ad5dad64be7f9b2a261f3286f79d85a2fc6155 (patch)
tree68136d8a683de48c21f49d9eea6bab334f81c121
parent77dba0ddf59069b0980b2413f6f46f0f012edcab (diff)
downloadguile-email-19ad5dad64be7f9b2a261f3286f79d85a2fc6155.tar.gz
guile-email-19ad5dad64be7f9b2a261f3286f79d85a2fc6155.tar.lz
guile-email-19ad5dad64be7f9b2a261f3286f79d85a2fc6155.zip
tests: Add example from RFC5322 A.6.3.
* tests/email.scm ("RFC5322 A.6.3. Obsolete white space and comments"): New test.
-rw-r--r--tests/email.scm30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/email.scm b/tests/email.scm
index 766c402..ac60f0e 100644
--- a/tests/email.scm
+++ b/tests/email.scm
@@ -243,6 +243,36 @@ So, \"Hello\".
"This is a message just to say hello.
So, \"Hello\"."))
+(test-email= "RFC5322 A.6.3. Obsolete white space and comments"
+ (parse-email
+ (string->bytevector
+ "From : John Doe <jdoe@machine(comment). example>
+To : Mary Smith
+
+ <mary@example.net>
+Subject : Saying Hello
+Date : Fri, 21 Nov 1997 09(comment): 55 : 06 -0600
+Message-ID : <1234 @ local(blah) .machine .example>
+
+This is a message just to say hello.
+So, \"Hello\".
+"
+ "utf-8"))
+ (make-email
+ `((from ((name . "John Doe")
+ (address . "jdoe@machine.example")))
+ (to ((name . "Mary Smith")
+ (address . "mary@example.net")))
+ (subject . "Saying Hello")
+ (date . ,(make-date 0 6 55 9 21 11 1997 -21600))
+ (message-id . "1234@local.machine.example")
+ (content-type (type . text)
+ (subtype . plain)
+ (charset . "utf-8"))
+ (content-transfer-encoding . 7bit))
+ "This is a message just to say hello.
+So, \"Hello\"."))
+
(test-email= "RFC2046 5.1.1. Common syntax"
(parse-email
(string->bytevector