[PATCH 2/2] test: add new test file for mime parsing.
authorDavid Bremner <david@tethera.net>
Fri, 2 Mar 2012 02:35:08 +0000 (22:35 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:10 +0000 (09:45 -0800)
be/945769becdf27323576cc111d8713c50bd2f53 [new file with mode: 0644]

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