From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 97808431FD0 for ; Wed, 28 Dec 2011 18:34:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LOD8hir5o0iH for ; Wed, 28 Dec 2011 18:34:49 -0800 (PST) Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU [18.9.25.14]) by olra.theworths.org (Postfix) with ESMTP id 473C4431FB6 for ; Wed, 28 Dec 2011 18:34:49 -0800 (PST) X-AuditID: 1209190e-b7f7c6d0000008c3-a5-4efbd1c82d09 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id 1A.F6.02243.8C1DBFE4; Wed, 28 Dec 2011 21:34:48 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id pBT2YmtQ012363; Wed, 28 Dec 2011 21:34:48 -0500 Received: from drake.mit.edu (c-76-21-105-205.hsd1.ca.comcast.net [76.21.105.205]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pBT2Yk8x025962 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 28 Dec 2011 21:34:48 -0500 (EST) Received: from amthrax by drake.mit.edu with local (Exim 4.77) (envelope-from ) id 1Rg5pN-0003bB-SI; Wed, 28 Dec 2011 21:34:45 -0500 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH] test: Make generated message date a real date Date: Wed, 28 Dec 2011 21:34:43 -0500 Message-Id: <1325126083-13792-1-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.7.3 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsUixG6nrnvi4m8/gw8v9S2u35zJ7MDo8WzV LeYAxigum5TUnMyy1CJ9uwSujIv7l7IUbFSsmLFgE3MD4wzpLkZODgkBE4m+710sELaYxIV7 69m6GLk4hAT2MUrcW7iIEcLZwCix/d9/RpAqIYFzTBKnnihBJOYzSqxa9IIJJMEmoCGxbf9y sCIRAWmJnXdns3YxcnAwC6hJ/OlSAQkLC9hJrHo8kQ3EZhFQlfjQeJYVxOYVcJD4veUf1BUK EudWn2OfwMi7gJFhFaNsSm6Vbm5iZk5xarJucXJiXl5qka6xXm5miV5qSukmRlAQcEry7WD8 elDpEKMAB6MSD6+n4W8/IdbEsuLK3EOMkhxMSqK8POeBQnxJ+SmVGYnFGfFFpTmpxYcYJTiY lUR4a3cD5XhTEiurUovyYVLSHCxK4rxqWu/8hATSE0tSs1NTC1KLYLIyHBxKErxMwGAXEixK TU+tSMvMKUFIM3FwggznARouBVLDW1yQmFucmQ6RP8WoKCXOawmSEABJZJTmwfXCovQVozjQ K8K80iBVPMAIh+t+BTSYCWjwuXO/QAaXJCKkpBoY16YkLjpqmnGQ+UG51u3e4hdm/93N2PXO GJ93vrn22vpi8bUPOcpTW9+u47Vl9+h2TPGoiaswst20TdHnbOvbKgv++Ot6Ls2O09/dkFHu n68TdEY212K/p7/tdP85yjz6YkdNXA5cFWadY/83sOa95bHfR+Lm1F1et3rBvziOgJfZju/v RHErsRRnJBpqMRcVJwIA0f+J760CAAA= X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2011 02:34:52 -0000 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 ca82445..a06c223 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 673b039..e875c8b 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 a60854f..d5872a5 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 99d3a3b..0171e64 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 8edf256..862095c 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="" -- 1.7.7.3