[PATCH 2/6] test: add tests for command line arguments to notmuch-dump
authordavid <david@tethera.net>
Mon, 10 Oct 2011 13:49:17 +0000 (10:49 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:39:39 +0000 (09:39 -0800)
d6/b703c0c9901128e607110a79312e45f2efa676 [new file with mode: 0644]

diff --git a/d6/b703c0c9901128e607110a79312e45f2efa676 b/d6/b703c0c9901128e607110a79312e45f2efa676
new file mode 100644 (file)
index 0000000..bcab04b
--- /dev/null
@@ -0,0 +1,105 @@
+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 8D1C7429E42\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Oct 2011 06:49:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_MED=-2.3] 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 h52qAZpV9T1S for <notmuch@notmuchmail.org>;\r
+       Mon, 10 Oct 2011 06:49:51 -0700 (PDT)\r
+Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 00C71429E32\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Oct 2011 06:49:50 -0700 (PDT)\r
+Received: from zancas.localnet\r
+       (fctnnbsc36w-156034064058.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
+       [156.34.64.58]) (authenticated bits=0)\r
+       by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p9ADnlo3010807\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
+       Mon, 10 Oct 2011 10:49:48 -0300\r
+Received: from bremner by zancas.localnet with local (Exim 4.76)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1RDGEl-0006fo-C3; Mon, 10 Oct 2011 10:49:47 -0300\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/6] test: add tests for command line arguments to\r
+ notmuch-dump\r
+Date: Mon, 10 Oct 2011 10:49:17 -0300\r
+Message-Id: <1318254561-25386-3-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.6.3\r
+In-Reply-To: <1318254561-25386-1-git-send-email-david@tethera.net>\r
+References: <8739f2qhla.fsf@zancas.localnet>\r
+       <1318254561-25386-1-git-send-email-david@tethera.net>\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: Mon, 10 Oct 2011 13:49:52 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+The plan is to add the possibility of search terms after the file name,\r
+and the use of -- to stop looking for an output file name.\r
+---\r
+ test/dump-restore |   28 ++++++++++++++++++++++++++++\r
+ 1 files changed, 28 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/dump-restore b/test/dump-restore\r
+index 96c4f19..699337c 100755\r
+--- a/test/dump-restore\r
++++ b/test/dump-restore\r
+@@ -8,6 +8,34 @@ test_expect_success "Dumping all tags" "generate_message &&\r
+ notmuch new &&\r
+ notmuch dump > dump.expected"\r
\r
++test_begin_subtest "dump outfile"\r
++notmuch dump dump-outfile.actual\r
++test_expect_equal_file dump.expected dump-outfile.actual\r
++\r
++test_begin_subtest "dump outfile --"\r
++notmuch dump dump-1-arg-dash.actual\r
++test_expect_equal_file dump.expected dump-1-arg-dash.actual\r
++\r
++# Note, we assume all messages from cworth have a message-id\r
++# containing cworth.org\r
++\r
++grep cworth\.org dump.expected > dump-cworth.expected\r
++\r
++test_begin_subtest "dump -- from:cworth"\r
++test_subtest_known_broken\r
++notmuch dump -- from:cworth > dump-dash-cworth.actual\r
++test_expect_equal_file dump-cworth.expected dump-dash-cworth.actual\r
++\r
++test_begin_subtest "dump outfile from:cworth"\r
++test_subtest_known_broken\r
++notmuch dump dump-outfile-cworth.actual from:cworth\r
++test_expect_equal_file dump-cworth.expected dump-outfile-cworth.actual\r
++\r
++test_begin_subtest "dump outfile -- from:cworth"\r
++test_subtest_known_broken\r
++notmuch dump dump-outfile-dash-inbox.actual -- from:cworth\r
++test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual\r
++\r
+ test_begin_subtest "Clearing all tags"\r
+ sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected\r
+ notmuch restore < clear.expected\r
+-- \r
+1.7.6.3\r
+\r