[PATCH 7/9] CLI: add properties to dump output
[notmuch-archives.git] / 4a / aee13b3f77947fc89e932bc62938c011456233
1 Return-Path: <jani@nikula.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id D817E431FD7\r
6         for <notmuch@notmuchmail.org>; Tue, 15 Jan 2013 13:55:14 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
13         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id qRusItmYEt5X for <notmuch@notmuchmail.org>;\r
17         Tue, 15 Jan 2013 13:55:14 -0800 (PST)\r
18 Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com\r
19         [209.85.217.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id B1C46431FBD\r
22         for <notmuch@notmuchmail.org>; Tue, 15 Jan 2013 13:55:06 -0800 (PST)\r
23 Received: by mail-lb0-f182.google.com with SMTP id go10so535810lbb.27\r
24         for <notmuch@notmuchmail.org>; Tue, 15 Jan 2013 13:55:05 -0800 (PST)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=google.com; s=20120113;\r
27         h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
28         :references:in-reply-to:references:x-gm-message-state;\r
29         bh=iUkysQufjsRsiFiizusF6lYFGKXmYlhr58F+m8UjVsI=;\r
30         b=n8QFdPCBrC9vHPxR7a4/ZPHFLHVmTdVwwaSjtUx/OooDyFx4uEzNB/YgChI49xrL7Q\r
31         QFk5gEgXlAjwBgTJ0GCDT8mjYyJvD7Cw2EIcKku8cz+mo3tPMjHrpdRhshHyLZyvLP4S\r
32         /vji+OeJFkLxW1KZqrLmbeysqfSblR8xdpngHl0ltKO7+jyPCKW6m87kfSCOTIih6mW8\r
33         wtdS60GhPsjQWsZaoyANz+Uk5MifFpKT7J6Hdy9Ba9Mbs17HowuOp/7K2B/pKucMiRpl\r
34         cDuWt7UXwJ9F8T4V8LCgS5MH4AUjCjnZv+Vj03Arf9ovovbnzZPlDI3TwUdhSohoz7I4\r
35         bg0g==\r
36 X-Received: by 10.152.134.167 with SMTP id pl7mr39428365lab.36.1358286905204; \r
37         Tue, 15 Jan 2013 13:55:05 -0800 (PST)\r
38 Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
39         [80.223.81.27])\r
40         by mx.google.com with ESMTPS id ee5sm7274565lbb.14.2013.01.15.13.55.03\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Tue, 15 Jan 2013 13:55:04 -0800 (PST)\r
43 From: Jani Nikula <jani@nikula.org>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH 5/5] test: notmuch count --batch and --input options\r
46 Date: Tue, 15 Jan 2013 23:54:47 +0200\r
47 Message-Id:\r
48  <111869c40ddc7c361fd3bac3ec3d04d428e687e9.1358273133.git.jani@nikula.org>\r
49 X-Mailer: git-send-email 1.7.10.4\r
50 In-Reply-To: <cover.1358273133.git.jani@nikula.org>\r
51 References: <cover.1358273133.git.jani@nikula.org>\r
52 In-Reply-To: <cover.1358273133.git.jani@nikula.org>\r
53 References: <cover.1358273133.git.jani@nikula.org>\r
54 X-Gm-Message-State:\r
55  ALoCoQnJEZR5Sd3V6gBUCTSo6PwI3FlorAKIX3twrRcUaaEPpdiMgIzXx9XPz7yPwFf+GsBLsKlD\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Tue, 15 Jan 2013 21:55:15 -0000\r
69 \r
70 ---\r
71  test/count |   46 ++++++++++++++++++++++++++++++++++++++++++++++\r
72  1 file changed, 46 insertions(+)\r
73 \r
74 diff --git a/test/count b/test/count\r
75 index 879b114..05713fd 100755\r
76 --- a/test/count\r
77 +++ b/test/count\r
78 @@ -38,4 +38,50 @@ test_expect_equal \\r
79      "0" \\r
80      "`notmuch count --output=threads from:cworth and not from:cworth`"\r
81  \r
82 +test_begin_subtest "message count is the default for batch count"\r
83 +notmuch count --batch >OUTPUT <<EOF\r
84 +\r
85 +from:cworth\r
86 +EOF\r
87 +notmuch count --output=messages >EXPECTED\r
88 +notmuch count --output=messages from:cworth >>EXPECTED\r
89 +test_expect_equal_file EXPECTED OUTPUT\r
90 +\r
91 +test_begin_subtest "batch message count"\r
92 +notmuch count --batch --output=messages >OUTPUT <<EOF\r
93 +from:cworth\r
94 +\r
95 +tag:inbox\r
96 +EOF\r
97 +notmuch count --output=messages from:cworth >EXPECTED\r
98 +notmuch count --output=messages >>EXPECTED\r
99 +notmuch count --output=messages tag:inbox >>EXPECTED\r
100 +test_expect_equal_file EXPECTED OUTPUT\r
101 +\r
102 +test_begin_subtest "batch thread count"\r
103 +notmuch count --batch --output=threads >OUTPUT <<EOF\r
104 +\r
105 +from:cworth\r
106 +from:cworth and not from:cworth\r
107 +foo\r
108 +EOF\r
109 +notmuch count --output=threads >EXPECTED\r
110 +notmuch count --output=threads from:cworth >>EXPECTED\r
111 +notmuch count --output=threads from:cworth and not from:cworth >>EXPECTED\r
112 +notmuch count --output=threads foo >>EXPECTED\r
113 +test_expect_equal_file EXPECTED OUTPUT\r
114 +\r
115 +test_begin_subtest "batch message count with input file"\r
116 +cat >INPUT <<EOF\r
117 +from:cworth\r
118 +\r
119 +tag:inbox\r
120 +EOF\r
121 +notmuch count --input=INPUT --output=messages >OUTPUT\r
122 +notmuch count --output=messages from:cworth >EXPECTED\r
123 +notmuch count --output=messages >>EXPECTED\r
124 +notmuch count --output=messages tag:inbox >>EXPECTED\r
125 +test_expect_equal_file EXPECTED OUTPUT\r
126 +\r
127 +\r
128  test_done\r
129 -- \r
130 1.7.10.4\r
131 \r