From 66ecd9063f041329d50f6ca2f9260e3b724eb868 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 28 Dec 2011 21:34:43 -0500 Subject: [PATCH] test: Make generated message date a real date 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 | 8 ++++---- test/encoding | 2 +- test/maildir-sync | 4 ++-- test/raw | 4 ++-- test/test-lib.sh | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/emacs b/test/emacs index ca824453..a06c2238 100755 --- a/test/emacs +++ b/test/emacs @@ -81,7 +81,7 @@ cat <EXPECTED "Invalid " From" (2001-01-05) (inbox) Subject: message-with-invalid-from To: Notmuch Test Suite -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 "' \ ----- Original Message ----- From: Notmuch Test Suite To: Notmuch Test Suite -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 (2001-01-05) (inbox) Subject: The problem with top-posting To: Notmuch Test Suite -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 (2001-01-05) (inbox unread) Subject: Re: The problem with top-posting To: Notmuch Test Suite -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. diff --git a/test/encoding b/test/encoding index 673b0394..e875c8b1 100755 --- a/test/encoding +++ b/test/encoding @@ -12,7 +12,7 @@ Notmuch Test Suite (2001-01-05) (inbox unread) Subject: Test message #1 From: Notmuch Test Suite To: Notmuch Test Suite -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 header} body{ part{ ID: 1, Content-type: text/plain diff --git a/test/maildir-sync b/test/maildir-sync index a60854f8..d5872a53 100755 --- a/test/maildir-sync +++ b/test/maildir-sync @@ -55,8 +55,8 @@ test_expect_equal "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite", "To": "Notmuch Test Suite ", "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"}]}, diff --git a/test/raw b/test/raw index 99d3a3bf..0171e641 100755 --- a/test/raw +++ b/test/raw @@ -19,7 +19,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite Message-Id: 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 Message-Id: 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)" diff --git a/test/test-lib.sh b/test/test-lib.sh index 8edf256e..862095cc 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -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="" -- 2.26.2