[Patch v7 3/6] test: restore with missing final newline
authorDavid Bremner <david@tethera.net>
Sat, 5 Apr 2014 15:43:53 +0000 (12:43 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:13 +0000 (10:01 -0800)
61/f36d4cbb208936e4664358a7d692eb56741543 [new file with mode: 0644]

diff --git a/61/f36d4cbb208936e4664358a7d692eb56741543 b/61/f36d4cbb208936e4664358a7d692eb56741543
new file mode 100644 (file)
index 0000000..2e87f88
--- /dev/null
@@ -0,0 +1,77 @@
+Return-Path: <bremner@tesseract.cs.unb.ca>\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 75437431FB6\r
+       for <notmuch@notmuchmail.org>; Sat,  5 Apr 2014 08:45:36 -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 HWaufJVQDblp for <notmuch@notmuchmail.org>;\r
+       Sat,  5 Apr 2014 08:45:32 -0700 (PDT)\r
+Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net\r
+       [87.98.215.224]) (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 1682C431FC2\r
+       for <notmuch@notmuchmail.org>; Sat,  5 Apr 2014 08:45:32 -0700 (PDT)\r
+Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim\r
+       4.72) (envelope-from <bremner@tesseract.cs.unb.ca>)\r
+       id 1WWSlx-00082T-4f; Sat, 05 Apr 2014 15:44:45 +0000\r
+Received: (nullmailer pid 10916 invoked by uid 1000); Sat, 05 Apr 2014\r
+       15:43:59 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [Patch v7 3/6] test: restore with missing final newline\r
+Date: Sat,  5 Apr 2014 12:43:53 -0300\r
+Message-Id: <1396712636-10640-4-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.9.0\r
+In-Reply-To: <1396712636-10640-1-git-send-email-david@tethera.net>\r
+References: <1396712636-10640-1-git-send-email-david@tethera.net>\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: Sat, 05 Apr 2014 15:45:36 -0000\r
+\r
+Recent proposed patches for gzipped input had a bug with handling\r
+missing newlines that was not caught by the current test suite\r
+---\r
+ test/T240-dump-restore.sh | 9 +++++++++\r
+ 1 file changed, 9 insertions(+)\r
+\r
+diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh\r
+index d79aca8..b6d8602 100755\r
+--- a/test/T240-dump-restore.sh\r
++++ b/test/T240-dump-restore.sh\r
+@@ -110,6 +110,15 @@ notmuch dump --format=batch-tag from:cworth | sed 's/^.*-- id://' | \\r
+     sort > OUTPUT.$test_count\r
+ test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count\r
\r
++test_begin_subtest "format=batch-tag, missing newline"\r
++printf "+a_tag_without_newline -- id:20091117232137.GA7669@griffis1.net" > IN\r
++notmuch restore --accumulate < IN\r
++notmuch dump id:20091117232137.GA7669@griffis1.net > OUT\r
++cat <<EOF > EXPECTED\r
+++a_tag_without_newline +inbox +unread -- id:20091117232137.GA7669@griffis1.net\r
++EOF\r
++test_expect_equal_file EXPECTED OUT\r
++\r
+ test_begin_subtest "format=batch-tag, # round-trip"\r
+ notmuch dump --format=sup | sort > EXPECTED.$test_count\r
+ notmuch dump --format=batch-tag | notmuch restore --format=batch-tag\r
+-- \r
+1.9.0\r
+\r