]> git.notmuchmail.org Git - notmuch/commitdiff
test: Make generated message date a real date
authorAustin Clements <amdragon@MIT.EDU>
Thu, 29 Dec 2011 02:34:43 +0000 (21:34 -0500)
committerDavid Bremner <bremner@debian.org>
Thu, 29 Dec 2011 21:47:21 +0000 (17:47 -0400)
January 5, 2001 was a Tuesday, not a Friday.  Jameson fixed this exact
problem for the multipart test in ec2b0a98cc, but not for
generate_message itself.

As Jameson pointed out in ec2b0a98cc, if we want to test date parsing,
we should do it separately.

test/emacs
test/encoding
test/maildir-sync
test/raw
test/test-lib.sh

index ca8244531e3eb76780c97dcee8ba865c275829e3..a06c22384a430fcf5ed452f9fcd6f4a57b1618ff 100755 (executable)
@@ -81,7 +81,7 @@ cat <<EOF >EXPECTED
 "Invalid " From" <test_suite@notmuchmail.org> (2001-01-05) (inbox)
 Subject: message-with-invalid-from
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 This is just a test message (#1)
 EOF
@@ -320,7 +320,7 @@ add_message '[from]="Top Poster <top@poster.com>"' \
 ----- Original Message -----
 From: Notmuch Test Suite <test_suite@notmuchmail.org>
 To: Notmuch Test Suite <test_suite@notmuchmai.org>
-Sent: Tue, 05 Jan 2001 15:43:57 -0000
+Sent: Fri, 05 Jan 2001 15:43:57 +0000
 Subject: The problem with top-posting
 
 Q: Why is top-posting such a bad thing?
@@ -331,7 +331,7 @@ test_emacs "(notmuch-show \"top-posting\")
 echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
 Subject: The problem with top-posting
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
@@ -340,7 +340,7 @@ Q: What is the most annoying thing in e-mail?
 Top Poster <top@poster.com> (2001-01-05) (inbox unread)
 Subject: Re: The problem with top-posting
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 Thanks for the advice! I will be sure to put it to good use.
 
index 673b0394860548a379b58733dba2823aa93cec9f..e875c8b1f4f8348f0e2156d2a9938b1e1f659ef1 100755 (executable)
@@ -12,7 +12,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread)
 Subject: Test message #1
 From: Notmuch Test Suite <test_suite@notmuchmail.org>
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 \fheader}
 \fbody{
 \fpart{ ID: 1, Content-type: text/plain
index a60854f8f59f311294effaa3690c80bc50703158..d5872a53589ccd106420190af66b71f8e5be4979 100755 (executable)
@@ -55,8 +55,8 @@ test_expect_equal "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite",
 "To": "Notmuch Test Suite <test_suite@notmuchmail.org>",
 "Cc": "",
 "Bcc": "",
-"Date": "Tue,
-05 Jan 2001 15:43:57 -0000"},
+"Date": "Fri,
+05 Jan 2001 15:43:57 +0000"},
 "body": [{"id": 1,
 "content-type": "text/plain",
 "content": "This is just a test message (#3)\n"}]},
index 99d3a3bf0460ee55009c72dcba1814cc59995ff8..0171e641efd624917a4f55fed4c9d39581384bfa 100755 (executable)
--- a/test/raw
+++ b/test/raw
@@ -19,7 +19,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.or
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
 Message-Id: <msg-001@notmuch-test-suite>
 Subject: Test message #1
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 This is just a test message (#1)"
 
@@ -29,7 +29,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.or
 To: Notmuch Test Suite <test_suite@notmuchmail.org>
 Message-Id: <msg-002@notmuch-test-suite>
 Subject: Test message #2
-Date: Tue, 05 Jan 2001 15:43:57 -0000
+Date: Fri, 05 Jan 2001 15:43:57 +0000
 
 This is just a test message (#2)"
 
index 8edf256ed9143fe193278a5072c46777fac67138..862095ccca4dc1c9358f4c5491c3c052d598b5bd 100644 (file)
@@ -323,7 +323,7 @@ generate_message ()
     fi
 
     if [ -z "${template[date]}" ]; then
-       template[date]="Tue, 05 Jan 2001 15:43:57 -0000"
+       template[date]="Fri, 05 Jan 2001 15:43:57 +0000"
     fi
 
     additional_headers=""