[PATCH] test: canonicalize content-type in "Sending a message via (fake) SMTP"
authordavid <david@tethera.net>
Thu, 30 Aug 2012 01:12:56 +0000 (22:12 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:13 +0000 (09:49 -0800)
ae/04e1983306cf19bcb26f18f030d3dd14565ed2 [new file with mode: 0644]

diff --git a/ae/04e1983306cf19bcb26f18f030d3dd14565ed2 b/ae/04e1983306cf19bcb26f18f030d3dd14565ed2
new file mode 100644 (file)
index 0000000..9c38924
--- /dev/null
@@ -0,0 +1,94 @@
+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 95ACB431FAF\r
+       for <notmuch@notmuchmail.org>; Wed, 29 Aug 2012 18:13:24 -0700 (PDT)\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 WjDf2+8T0rrA for <notmuch@notmuchmail.org>;\r
+       Wed, 29 Aug 2012 18:13:22 -0700 (PDT)\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 C3D66431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 29 Aug 2012 18:13:22 -0700 (PDT)\r
+Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net\r
+       ([156.34.89.108] helo=zancas.localnet)\r
+       by tesseract.cs.unb.ca with esmtpsa\r
+       (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1T6tJt-0002at-4t; Wed, 29 Aug 2012 22:13:21 -0300\r
+Received: from bremner by zancas.localnet with local (Exim 4.80)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1T6tJn-0004Fc-8r; Wed, 29 Aug 2012 22:13:11 -0300\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] test: canonicalize content-type in "Sending a message via\r
+       (fake) SMTP"\r
+Date: Wed, 29 Aug 2012 22:12:56 -0300\r
+Message-Id: <1346289176-15884-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.10.4\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: Thu, 30 Aug 2012 01:13:24 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+The version of message.el in emacs24 omits the charset=us-ascii,\r
+causing the current version of this test to fail. Here we just ask\r
+that the content-type start with "text/plain"\r
+---\r
+\r
+Alternatively, somebody might want to dig into message.el and\r
+understand why it behaves differently in emacs24. I could not\r
+replicate the omission of charset=us-ascii sending a message\r
+interactively.\r
+\r
+ test/emacs |    5 +++--\r
+ 1 file changed, 3 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index afe35ba..6fab4db 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -169,7 +169,8 @@ emacs_deliver_message \\r
+      (insert "To: user@example.com\n")'\r
+ sed \\r
+     -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \\r
+-    -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' < sent_message >OUTPUT\r
++    -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' \\r
++    -e s',^Content-Type: text/plain.*$,Content-Type: XXX,' < sent_message >OUTPUT\r
+ cat <<EOF >EXPECTED\r
+ From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+ To: user@example.com\r
+@@ -178,7 +179,7 @@ Date: 01 Jan 2000 12:00:00 -0000\r
+ User-Agent: Notmuch/XXX Emacs/XXX\r
+ Message-ID: <XXX>\r
+ MIME-Version: 1.0\r
+-Content-Type: text/plain; charset=us-ascii\r
++Content-Type: XXX\r
\r
+ This is a test that messages are sent via SMTP\r
+ EOF\r
+-- \r
+1.7.10.4\r
+\r