[PATCH] test: canonicalize content-type in "Sending a message via (fake) SMTP"
authordavid <david@tethera.net>
Thu, 30 Aug 2012 23:24:34 +0000 (20:24 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:14 +0000 (09:49 -0800)
8f/cef060f575f05079acff85325f5759e5fe9ca6 [new file with mode: 0644]

diff --git a/8f/cef060f575f05079acff85325f5759e5fe9ca6 b/8f/cef060f575f05079acff85325f5759e5fe9ca6
new file mode 100644 (file)
index 0000000..c9d9279
--- /dev/null
@@ -0,0 +1,95 @@
+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 F0E2D431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Aug 2012 16:24:56 -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 71YeM-tsvMvH for <notmuch@notmuchmail.org>;\r
+       Thu, 30 Aug 2012 16:24:55 -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 F3C54431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 30 Aug 2012 16:24:54 -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 1T7E6T-00048P-Nl; Thu, 30 Aug 2012 20:24:53 -0300\r
+Received: from bremner by zancas.localnet with local (Exim 4.80)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1T7E6O-0002Cl-AA; Thu, 30 Aug 2012 20:24:44 -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: Thu, 30 Aug 2012 20:24:34 -0300\r
+Message-Id: <1346369074-8366-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <20120830013653.GF11179@mit.edu>\r
+References: <20120830013653.GF11179@mit.edu>\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 23:24:57 -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. With this patch, we\r
+accept either option.  According to RFC 2046, they are semantically\r
+equivalent.\r
+---\r
+\r
+as discussed on IRC, the $ is not quite as nice as \b, but it is\r
+POSIX.2, at least according to "man 7 regex"\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..5d118b6 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\); charset=us-ascii$,\1,' < 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: text/plain\r
+ \r
+ This is a test that messages are sent via SMTP\r
+ EOF\r
+-- \r
+1.7.10.4\r
+\r