[PATCH v3 5/6] test: notmuch count --batch and --input options
authorJani Nikula <jani@nikula.org>
Sun, 31 Mar 2013 09:46:02 +0000 (12:46 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:54:08 +0000 (09:54 -0800)
5f/b3b1a5740185cc46e91181f52070f60be3dbd3 [new file with mode: 0644]

diff --git a/5f/b3b1a5740185cc46e91181f52070f60be3dbd3 b/5f/b3b1a5740185cc46e91181f52070f60be3dbd3
new file mode 100644 (file)
index 0000000..0104e1e
--- /dev/null
@@ -0,0 +1,132 @@
+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 7C5FA431FC3\r
+       for <notmuch@notmuchmail.org>; Sun, 31 Mar 2013 02:46:29 -0700 (PDT)\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 w9zWytTLSZsV for <notmuch@notmuchmail.org>;\r
+       Sun, 31 Mar 2013 02:46:28 -0700 (PDT)\r
+Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com\r
+       [209.85.217.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id DB8A4429E30\r
+       for <notmuch@notmuchmail.org>; Sun, 31 Mar 2013 02:46:21 -0700 (PDT)\r
+Received: by mail-lb0-f169.google.com with SMTP id p11so1251861lbi.28\r
+       for <notmuch@notmuchmail.org>; Sun, 31 Mar 2013 02:46:20 -0700 (PDT)\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=Q+jJWEyhUokhay14V2v2WqvuC5ZpCRCY10r6CzzWgzToqmyKRKjEpK5MB2lY8EQvLT\r
+       Mx8pD3ut4s6K3Cbb/AMfVFL5LwnV/bK1Rg9oBY3eVcNiObcoaAuCp9aVaoMZcyvGPIOW\r
+       ap8oIC3qY2XOCSuOa+M6EG8Hx7EeRafXkku+OEkZc07OO5Nzz3BGX5Fm+emsvvc4tdWz\r
+       DmlwutOMOcHaAifg+ZnvPreQ4BgJN5fzwkRNqSwZuLrSmQ70O4jYrq9eIaMENDqVHFhR\r
+       mbMFUrZmqH2Ltmy1i+98wCrtm57E8l/VfbCPEH0CYGTPKHwIefrQHnXj7fTbAxnb8wWk\r
+       nipw==\r
+X-Received: by 10.112.145.8 with SMTP id sq8mr4016072lbb.55.1364723180477;\r
+       Sun, 31 Mar 2013 02:46:20 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id nv3sm3709547lbb.15.2013.03.31.02.46.18\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sun, 31 Mar 2013 02:46:19 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v3 5/6] test: notmuch count --batch and --input options\r
+Date: Sun, 31 Mar 2013 12:46:02 +0300\r
+Message-Id:\r
+ <b425e543ab3fabb51e9cc88fd6faee2c9433c636.1364722841.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <cover.1364722841.git.jani@nikula.org>\r
+References: <cover.1364722841.git.jani@nikula.org>\r
+In-Reply-To: <cover.1364722841.git.jani@nikula.org>\r
+References: <cover.1364722841.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQli9u8YvdLglsjlkWtcIPikEYJcfENL4ULw5bOTPyJFfOUBPh/5OlDEQ1qoDatxdtzHUr5p\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\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, 31 Mar 2013 09:46:30 -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