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 CBDDE431FD7 for ; Thu, 1 Mar 2012 18:35:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 GGZ7mrjGKw05 for ; Thu, 1 Mar 2012 18:35:27 -0800 (PST) Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 8BF3C431FB6 for ; Thu, 1 Mar 2012 18:35:27 -0800 (PST) Received: from fctnnbsc30w-142166230117.dhcp-dynamic.fibreop.nb.bellaliant.net ([142.166.230.117] helo=zancas.localnet) by tesseract.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1S3IL8-00085t-7T; Thu, 01 Mar 2012 22:35:26 -0400 Received: from bremner by zancas.localnet with local (Exim 4.77) (envelope-from ) id 1S3IL2-0001uu-Qq; Thu, 01 Mar 2012 22:35:20 -0400 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 2/2] test: add new test file for mime parsing. Date: Thu, 1 Mar 2012 22:35:08 -0400 Message-Id: <1330655708-7318-3-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1330655708-7318-1-git-send-email-david@tethera.net> References: <20120301215738.GA7466@mit.edu> <1330655708-7318-1-git-send-email-david@tethera.net> X-Spam_bar: - Cc: David Bremner 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: Fri, 02 Mar 2012 02:35:29 -0000 From: David Bremner For now, just tests one message currently causing notmuch to segfault. --- test/mime | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ test/notmuch-test | 1 + 2 files changed, 68 insertions(+), 0 deletions(-) create mode 100755 test/mime diff --git a/test/mime b/test/mime new file mode 100755 index 0000000..5b2d77f --- /dev/null +++ b/test/mime @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +test_description="mime parsing" +. test-lib.sh + +add_rfc822_message < +Envelope-to: bobafett@archangel.wmdcantina.org +Delivery-date: Wed, 09 Feb 2011 10:06:54 -0400 +Received: from fiero.its.cantina.org ([131.202.1.10]) + by archangel.wmdcantina.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) + (Exim 4.69) + (envelope-from ) + id 1PnAh4-0000AX-DH + for bobafett@archangel.wmdcantina.org; Wed, 09 Feb 2011 10:06:54 -0400 +Received: from mx3.nbpei-ecn.ca (mx3.nbpei-ecn.ca [198.164.163.196]) + by fiero.its.cantina.org (8.13.8/8.13.8) with ESMTP id p19E6lst014693 + for ; Wed, 9 Feb 2011 10:06:47 -0400 +Received: from mx3.nbpei-ecn.ca (localhost.localdomain [127.0.0.1]) + by localhost (Postfix) with SMTP id EC0C04B8002 + for ; Wed, 9 Feb 2011 10:06:47 -0400 (AST) +Received: from cibc.ca (mail4.cibc.ca [199.198.251.34]) + by mx3.nbpei-ecn.ca (Postfix) with ESMTP id A80824B8003 + for ; Wed, 9 Feb 2011 10:06:47 -0400 (AST) +From: "Smith, Bob" +To: "'BOBAFETT@CANTINA.ORG'" +Disposition-Notification-To: "Smith, Bob" +Return-Receipt-To: +Date: Wed, 9 Feb 2011 09:06:43 -0500 +Subject: +Thread-Index: AcvIYpRcEJX82QtpQSacs5hsY+i4SQ== +Message-ID: <5BB75198A4300643A295D4678B10F0503BDDF7CEB1@CBMCC-X7-MBX09.ad.fbi.gov> +Accept-Language: en-US +Content-Language: en-US +X-MS-Has-Attach: +X-MS-TNEF-Correlator: +acceptlanguage: en-US +Content-Type: multipart/alternative; + boundary="_000_5BB75198A4300643A295D4678B10F0503BDDF7CEB1CBMCCX7MBX09a_" +MIME-Version: 1.0 +X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.2.9.135719 +X-PerlMx-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' + BLANK_SUBJECT 0.1, HTML_NO_HTTP 0.1, SUPERLONG_LINE 0.05, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_4000_4999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, __C230066_P5 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __FRAUD_CONTACT_NUM 0, __HAS_HTML 0, __HAS_MSGID 0, __MIME_HTML 0, __MIME_VERSION 0, __PHISH_FROM 0, __PHISH_FROM1 0, __PHISH_FROM_C 0, __SANE_MSGID 0, __STOCK_PHRASE_8 0, __TAG_EXISTS_HTML 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0' +X-Sender-Verified: bob.smith@fbi.gov + +--_000_5BB75198A4300643A295D4678B10F0503BDDF7CEB1CBMCCX7MBX09a_ +Content-Type: text/plain; charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + +quoted printable stuff. + + +--_000_5BB75198A4300643A295D4678B10F0503BDDF7CEB1CBMCCX7MBX09a_ +Content-Type: text/html; charset="iso-8859-1" +Content-Transfer-Encoding: quoted-printable + + +some other stuff + + +--_000_5BB75198A4300643A295D4678B10F0503BDDF7CEB1CBMCCX7MBX09a_-- + + +EOF +test_expect_success 'output message as json' "notmuch show --format=json id:5BB75198A4300643A295D4678B10F0503BDDF7CEB1@CBMCC-X7-MBX09.ad.fbi.gov > /dev/null" +test_done diff --git a/test/notmuch-test b/test/notmuch-test index f03b594..b572f1c 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -56,6 +56,7 @@ TESTS=" emacs-address-cleaning emacs-hello emacs-show + mime " TESTS=${NOTMUCH_TESTS:=$TESTS} -- 1.7.9