[PATCH 5/5] test: notmuch count --batch and --input options
authorJani Nikula <jani@nikula.org>
Tue, 15 Jan 2013 21:54:47 +0000 (23:54 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:07 +0000 (09:53 -0800)
4a/aee13b3f77947fc89e932bc62938c011456233 [new file with mode: 0644]

diff --git a/4a/aee13b3f77947fc89e932bc62938c011456233 b/4a/aee13b3f77947fc89e932bc62938c011456233
new file mode 100644 (file)
index 0000000..ca3158b
--- /dev/null
@@ -0,0 +1,131 @@
+Return-Path: <jani@nikula.org>\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 D817E431FD7\r
+       for <notmuch@notmuchmail.org>; Tue, 15 Jan 2013 13:55:14 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\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 qRusItmYEt5X for <notmuch@notmuchmail.org>;\r
+       Tue, 15 Jan 2013 13:55:14 -0800 (PST)\r
+Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com\r
+       [209.85.217.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id B1C46431FBD\r
+       for <notmuch@notmuchmail.org>; Tue, 15 Jan 2013 13:55:06 -0800 (PST)\r
+Received: by mail-lb0-f182.google.com with SMTP id go10so535810lbb.27\r
+       for <notmuch@notmuchmail.org>; Tue, 15 Jan 2013 13:55:05 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
+       :references:in-reply-to:references:x-gm-message-state;\r
+       bh=iUkysQufjsRsiFiizusF6lYFGKXmYlhr58F+m8UjVsI=;\r
+       b=n8QFdPCBrC9vHPxR7a4/ZPHFLHVmTdVwwaSjtUx/OooDyFx4uEzNB/YgChI49xrL7Q\r
+       QFk5gEgXlAjwBgTJ0GCDT8mjYyJvD7Cw2EIcKku8cz+mo3tPMjHrpdRhshHyLZyvLP4S\r
+       /vji+OeJFkLxW1KZqrLmbeysqfSblR8xdpngHl0ltKO7+jyPCKW6m87kfSCOTIih6mW8\r
+       wtdS60GhPsjQWsZaoyANz+Uk5MifFpKT7J6Hdy9Ba9Mbs17HowuOp/7K2B/pKucMiRpl\r
+       cDuWt7UXwJ9F8T4V8LCgS5MH4AUjCjnZv+Vj03Arf9ovovbnzZPlDI3TwUdhSohoz7I4\r
+       bg0g==\r
+X-Received: by 10.152.134.167 with SMTP id pl7mr39428365lab.36.1358286905204; \r
+       Tue, 15 Jan 2013 13:55:05 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id ee5sm7274565lbb.14.2013.01.15.13.55.03\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Tue, 15 Jan 2013 13:55:04 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 5/5] test: notmuch count --batch and --input options\r
+Date: Tue, 15 Jan 2013 23:54:47 +0200\r
+Message-Id:\r
+ <111869c40ddc7c361fd3bac3ec3d04d428e687e9.1358273133.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <cover.1358273133.git.jani@nikula.org>\r
+References: <cover.1358273133.git.jani@nikula.org>\r
+In-Reply-To: <cover.1358273133.git.jani@nikula.org>\r
+References: <cover.1358273133.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQnJEZR5Sd3V6gBUCTSo6PwI3FlorAKIX3twrRcUaaEPpdiMgIzXx9XPz7yPwFf+GsBLsKlD\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: Tue, 15 Jan 2013 21:55:15 -0000\r
+\r
+---\r
+ test/count |   46 ++++++++++++++++++++++++++++++++++++++++++++++\r
+ 1 file changed, 46 insertions(+)\r
+\r
+diff --git a/test/count b/test/count\r
+index 879b114..05713fd 100755\r
+--- a/test/count\r
++++ b/test/count\r
+@@ -38,4 +38,50 @@ test_expect_equal \\r
+     "0" \\r
+     "`notmuch count --output=threads from:cworth and not from:cworth`"\r
\r
++test_begin_subtest "message count is the default for batch count"\r
++notmuch count --batch >OUTPUT <<EOF\r
++\r
++from:cworth\r
++EOF\r
++notmuch count --output=messages >EXPECTED\r
++notmuch count --output=messages from:cworth >>EXPECTED\r
++test_expect_equal_file EXPECTED OUTPUT\r
++\r
++test_begin_subtest "batch message count"\r
++notmuch count --batch --output=messages >OUTPUT <<EOF\r
++from:cworth\r
++\r
++tag:inbox\r
++EOF\r
++notmuch count --output=messages from:cworth >EXPECTED\r
++notmuch count --output=messages >>EXPECTED\r
++notmuch count --output=messages tag:inbox >>EXPECTED\r
++test_expect_equal_file EXPECTED OUTPUT\r
++\r
++test_begin_subtest "batch thread count"\r
++notmuch count --batch --output=threads >OUTPUT <<EOF\r
++\r
++from:cworth\r
++from:cworth and not from:cworth\r
++foo\r
++EOF\r
++notmuch count --output=threads >EXPECTED\r
++notmuch count --output=threads from:cworth >>EXPECTED\r
++notmuch count --output=threads from:cworth and not from:cworth >>EXPECTED\r
++notmuch count --output=threads foo >>EXPECTED\r
++test_expect_equal_file EXPECTED OUTPUT\r
++\r
++test_begin_subtest "batch message count with input file"\r
++cat >INPUT <<EOF\r
++from:cworth\r
++\r
++tag:inbox\r
++EOF\r
++notmuch count --input=INPUT --output=messages >OUTPUT\r
++notmuch count --output=messages from:cworth >EXPECTED\r
++notmuch count --output=messages >>EXPECTED\r
++notmuch count --output=messages tag:inbox >>EXPECTED\r
++test_expect_equal_file EXPECTED OUTPUT\r
++\r
++\r
+ test_done\r
+-- \r
+1.7.10.4\r
+\r