unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Cc: David Bremner <bremner@debian.org>
Subject: [PATCH 2/2] test: add new test file for mime parsing.
Date: Thu,  1 Mar 2012 22:35:08 -0400	[thread overview]
Message-ID: <1330655708-7318-3-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1330655708-7318-1-git-send-email-david@tethera.net>

From: David Bremner <bremner@debian.org>

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 <<EOF
+From bob.smith@fbi.gov Wed Feb 09 10:06:54 2011
+Return-path: <bob.smith@fbi.gov>
+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 <bob.smith@fbi.gov>)
+	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 <bobafett@cantina.org>; 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 <bobafett@cantina.org>; 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 <bobafett@cantina.org>; Wed,  9 Feb 2011 10:06:47 -0400 (AST)
+From: "Smith, Bob" <Bob.Smith@fbi.gov>
+To: "'BOBAFETT@CANTINA.ORG'" <BOBAFETT@cantina.org>
+Disposition-Notification-To: "Smith, Bob" <Bob.Smith@fbi.gov>
+Return-Receipt-To: <Bob.Smith@FBI.GOV>
+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
+
+<html>
+some other stuff
+</html>
+
+--_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

  parent reply	other threads:[~2012-03-02  2:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 21:39 Internal error on line 296 of mime-node.c David Bremner
2012-03-01 21:57 ` Austin Clements
2012-03-02  2:35   ` David Bremner
2012-03-02  2:35     ` [PATCH 1/2] test: utility function to add a pre-generated message to the database David Bremner
2012-03-02  2:35     ` David Bremner [this message]
2012-03-06 18:26 ` [PATCH] Handle errors in mime_node_open Austin Clements
2012-03-06 22:04   ` Parsing regression with gmime-2.6? David Bremner
2012-03-08 15:35     ` [WIP PATCH] debugging gmime-2.6 fail David Bremner
2012-03-08 18:08       ` David Bremner
2012-03-08 18:27     ` Parsing regression with gmime-2.6? Jameson Graef Rollins
2012-03-08 20:30     ` Daniel Kahn Gillmor
2012-03-08 21:32       ` Jameson Graef Rollins
2012-03-08 21:40         ` Daniel Kahn Gillmor
2012-03-08 21:59           ` Jameson Graef Rollins
2012-03-08 21:48       ` [PATCH] mime_node_open: check if the file is in mbox format, and inform gmime David Bremner
2012-03-08 22:05         ` Jameson Graef Rollins
2012-03-09 10:50         ` Tomi Ollila
2012-03-09 13:31           ` [PATCH] mime_node_open: skip envelope from lines at the start of messages David Bremner
2012-03-09 13:56           ` David Bremner
2012-03-09 16:20             ` Daniel Kahn Gillmor
2012-03-10 13:25               ` David Bremner
2012-03-10 14:45                 ` Tomi Ollila
2012-03-11  1:51   ` [PATCH] Handle errors in mime_node_open David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330655708-7318-3-git-send-email-david@tethera.net \
    --to=david@tethera.net \
    --cc=bremner@debian.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).