[PATCH 1/3] test: Test notmuch new for single-message mbox
authorAustin Clements <amdragon@MIT.EDU>
Sun, 25 Nov 2012 06:15:59 +0000 (01:15 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:57 +0000 (09:50 -0800)
74/a9530644c8ef94d37ce217481a18b57fd364a4 [new file with mode: 0644]

diff --git a/74/a9530644c8ef94d37ce217481a18b57fd364a4 b/74/a9530644c8ef94d37ce217481a18b57fd364a4
new file mode 100644 (file)
index 0000000..77c0a79
--- /dev/null
@@ -0,0 +1,102 @@
+Return-Path: <amdragon@mit.edu>\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 29016431FC0\r
+       for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 22:16:24 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 sckN-XGgHgIM for <notmuch@notmuchmail.org>;\r
+       Sat, 24 Nov 2012 22:16:23 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU\r
+       [18.7.68.37])\r
+       by olra.theworths.org (Postfix) with ESMTP id DFC1D431FC9\r
+       for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 22:16:15 -0800 (PST)\r
+X-AuditID: 12074425-b7fcc6d00000091f-64-50b1b7aff484\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 59.BB.02335.FA7B1B05; Sun, 25 Nov 2012 01:16:15 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qAP6G575028264; \r
+       Sun, 25 Nov 2012 01:16:05 -0500\r
+Received: from drake.dyndns.org\r
+       (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [209.6.116.242]) (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAP6G3j3006917\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Sun, 25 Nov 2012 01:16:04 -0500 (EST)\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1TcVVb-0008HM-7x; Sun, 25 Nov 2012 01:16:03 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] test: Test notmuch new for single-message mbox\r
+Date: Sun, 25 Nov 2012 01:15:59 -0500\r
+Message-Id: <1353824161-31717-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrCIsWRmVeSWpSXmKPExsUixG6nort++8YAg+PLdSxutHYzWly/OZPZ\r
+       gcnj2apbzB5bDr1nDmCK4rJJSc3JLEst0rdL4Mq4NWcmW8FM9opjm+axNDD+Zu1i5OCQEDCR\r
+       uL49v4uRE8gUk7hwbz1bFyMXh5DAPkaJ3hdvmSCcDYwSl15sYoRwHjFJnJ13mBGkRUhgLqPE\r
+       ho0qIDabgIbEtv3LweIiAtISO+/OZgWxmQUsJa5+bWcCsYUFnCUedk5gAbFZBFQlOi7uYgex\r
+       eQUcJBZ9+s4GcYaiRPezCWwTGHkXMDKsYpRNya3SzU3MzClOTdYtTk7My0st0rXQy80s0UtN\r
+       Kd3ECA4MF9UdjBMOKR1iFOBgVOLhvZG4MUCINbGsuDL3EKMkB5OSKO/UzUAhvqT8lMqMxOKM\r
+       +KLSnNTiQ4wSHMxKIrwH1gLleFMSK6tSi/JhUtIcLErivDdSbvoLCaQnlqRmp6YWpBbBZGU4\r
+       OJQkeLdvBWoULEpNT61Iy8wpQUgzcXCCDOcBGi69HWR4cUFibnFmOkT+FKOilDjvn21ACQGQ\r
+       REZpHlwvLHJfMYoDvSLMKwjSzgOMerjuV0CDmYAGP529DmRwSSJCSqqBsbCmuO0Ma9iyHbcP\r
+       HqrMFH9/95PFHcE7/rJmMW5d82oErGNeamiLixSmMTz0STz7o1fIZMHhHO6um+1bnEwv7ToX\r
+       If6AW+G2yRqb6ydj1IQirp/T3vpIR/Gq6jGxi51xD3Ibl8U8NdmRdqbyV5yb4bptTuXBd7nV\r
+       FxzlUeP1YgxVDj++8NdeJZbijERDLeai4kQA/SMqsLcCAAA=\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: Sun, 25 Nov 2012 06:16:24 -0000\r
+\r
+We support this for historical reasons.\r
+---\r
+ test/new |   13 +++++++++++++\r
+ 1 file changed, 13 insertions(+)\r
+\r
+diff --git a/test/new b/test/new\r
+index 587aa11..43d56e4 100755\r
+--- a/test/new\r
++++ b/test/new\r
+@@ -163,6 +163,19 @@ rm -rf "${MAIL_DIR}"/two\r
+ output=$(NOTMUCH_NEW)\r
+ test_expect_equal "$output" "No new mail. Removed 3 messages."\r
\r
++test_begin_subtest "Support single-message mbox"\r
++cat > "${MAIL_DIR}"/mbox_file1 <<EOF\r
++From test_suite@notmuchmail.org Fri Jan  5 15:43:57 2001\r
++From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++To: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++Subject: Test mbox message 1\r
++\r
++Body.\r
++EOF\r
++output=$(NOTMUCH_NEW 2>&1)\r
++test_expect_equal "$output" \\r
++"Added 1 new message to the database."\r
++\r
+ # This test requires that notmuch new has been run at least once.\r
+ test_begin_subtest "Skip and report non-mail files"\r
+ generate_message\r
+-- \r
+1.7.10.4\r
+\r