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 3D132431FB6 for ; Sun, 5 Jun 2011 17:29:40 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.921 X-Spam-Level: X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5 tests=[NO_DNS_FOR_FROM=0.379, RCVD_IN_DNSWL_MED=-2.3] 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 YCZtUBymEPmc for ; Sun, 5 Jun 2011 17:29:38 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id CB89A429E27 for ; Sun, 5 Jun 2011 17:29:37 -0700 (PDT) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 20A6466E027D; Sun, 5 Jun 2011 17:29:36 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from servo.finestructure.net (cpe-98-149-172-122.socal.res.rr.com [98.149.172.122]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id A65F666E010B; Sun, 5 Jun 2011 17:29:30 -0700 (PDT) Received: by servo.finestructure.net (Postfix, from userid 1000) id 1DA801A9; Sun, 5 Jun 2011 17:29:31 -0700 (PDT) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH 2/5] test: Fix date in test message in multipart test. Date: Sun, 5 Jun 2011 17:29:26 -0700 Message-Id: <1307320169-29905-3-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1307320169-29905-2-git-send-email-jrollins@finestructure.net> References: <87sjrsi2b4.fsf@servo.factory.finestructure.net> <1307320169-29905-1-git-send-email-jrollins@finestructure.net> <1307320169-29905-2-git-send-email-jrollins@finestructure.net> 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: Mon, 06 Jun 2011 00:29:40 -0000 The test message date, "Tue, 05 Jan 2001 15:43:57 -0000", is not actually a real date. 05 Jan 2001 was in fact a Friday, not a Tuesday. Date parsers (such as "date" in coreutils) will return "Fri" as the day for this string, even if "Tue" is specified. Also, the time zone "-0000" is actually always returned as "+0000", so we change that here was well. This will be relevant for later patches when we begin parsing rfc822 part headers, where gmime returns a parsed date string. If we do want to test date parsing, we should do that in a separate test. --- test/multipart | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/multipart b/test/multipart index 9d6a9d1..67e04d9 100755 --- a/test/multipart +++ b/test/multipart @@ -6,7 +6,7 @@ cat < ${MAIL_DIR}/multipart From: Carl Worth To: cworth@cworth.org Subject: Multipart message -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Message-ID: <87liy5ap00.fsf@yoom.home.cworth.org> MIME-Version: 1.0 @@ -23,7 +23,7 @@ Content-Disposition: inline From: Carl Worth To: cworth@cworth.org Subject: html message -Date: Tue, 05 Jan 2001 15:42:57 -0000 +Date: Fri, 05 Jan 2001 15:42:57 +0000 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Message-ID: <87liy5ap01.fsf@yoom.home.cworth.org> MIME-Version: 1.0 @@ -61,7 +61,7 @@ cat < ${MAIL_DIR}/base64-part-with-crlf From: Carl Worth To: cworth@cworth.org Subject: Test message with a BASE64 encoded binary containing CRLF pair -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Message-ID: MIME-Version: 1.0 @@ -100,7 +100,7 @@ Carl Worth (2001-01-05) (attachment inbox signed unread) Subject: Multipart message From: Carl Worth To: cworth@cworth.org -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: multipart/signed @@ -235,7 +235,7 @@ test_expect_success \ test_begin_subtest "--format=json --part=0, full message" output=$(notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org') test_expect_equal "$output" \ -'{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "'"${MAIL_DIR}/multipart"'", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth ", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Tue, 05 Jan 2001 15:43:57 -0000"}, "body": [{"id": 1, "content-type": "multipart/signed", "content": [{"id": 2, "content-type": "multipart/mixed", "content": [{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}, {"id": 5, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 6, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}, {"id": 7, "content-type": "application/pgp-signature"}]}]}' +'{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "'"${MAIL_DIR}/multipart"'", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth ", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [{"id": 1, "content-type": "multipart/signed", "content": [{"id": 2, "content-type": "multipart/mixed", "content": [{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}, {"id": 5, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 6, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}, {"id": 7, "content-type": "application/pgp-signature"}]}]}' test_begin_subtest "--format=json --part=1, message body" output=$(notmuch show --format=json --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org') @@ -385,7 +385,7 @@ To: Carl Worth , cworth@cworth.org In-Reply-To: <87liy5ap00.fsf@yoom.home.cworth.org> References: <87liy5ap00.fsf@yoom.home.cworth.org> -On Tue, 05 Jan 2001 15:43:57 -0000, Carl Worth wrote: +On Fri, 05 Jan 2001 15:43:57 +0000, Carl Worth wrote: Non-text part: multipart/signed Non-text part: multipart/mixed Non-text part: message/rfc822 -- 1.7.4.4