Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / c5 / f6db91fa045c389e2682548f68c43dac4d44b1
1 Return-Path: <daniel@schoepe.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 arlo.cworth.org (Postfix) with ESMTP id BC9C86DE02D6\r
6  for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 00:47:31 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.11\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.11 tagged_above=-999 required=5 tests=[AWL=0.097, \r
12  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13  RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
14  RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_WEB=0.614, SPF_PASS=-0.001]\r
15  autolearn=disabled\r
16 Received: from arlo.cworth.org ([127.0.0.1])\r
17  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
18  with ESMTP id p0FyRYjmPQcA for <notmuch@notmuchmail.org>;\r
19  Tue, 11 Aug 2015 00:47:29 -0700 (PDT)\r
20 Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com\r
21  [209.85.212.180])\r
22  by arlo.cworth.org (Postfix) with ESMTPS id 7D02C6DE179D\r
23  for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 00:47:27 -0700 (PDT)\r
24 Received: by wicja10 with SMTP id ja10so64505257wic.1\r
25  for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 00:47:26 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google;\r
27  h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28  bh=Xzk1weZX2lYeB3GjWvB/iEeHJ4XLvDqXaFlX47rv/ro=;\r
29  b=hE4c/aeK+uB3E9i0rWYS94NrRKPy1YRGApdWWrNZftsdT6hBzIGIoLxHlodhKI8x3P\r
30  QbkyB9wMzAVBpxlhuyI+ZRazJzY1pxgkgx5Tlyb2yLroqSwPgdLIc5bbzJYC5HYktiDt\r
31  S6kGG3IwYt7JboBMgpCo5s9lbnGIeqI+etRQc=\r
32 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
33  d=1e100.net; s=20130820;\r
34  h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
35  :references;\r
36  bh=Xzk1weZX2lYeB3GjWvB/iEeHJ4XLvDqXaFlX47rv/ro=;\r
37  b=XrWUr1vPY0+I3tm5uzNZ5f+RzurrVH8j7i05fyVWMu8QteBeBDgRD8CL904AUyrpnO\r
38  7wYPuQbpl8jwciKVkHvzl1MVkgL1qHB5cdfqyjF3Pf7/DcaeECtbOXbB8gIFJ7UWvf3Q\r
39  mLlW/VkERn0jfpB76z0o/lstLezzNvG/czVvG2DAxbrum3iurGfKG4HmdoXX+WxxXEqE\r
40  /LG0rUrqBVTnf0qldrJTlGlIVkxLbA5mJvsrUOtThr+iqo8V9IAfzxSVug/eDNF/31l2\r
41  VsS9gFjPBCm/yWpbPa2R3dYVs/RxOr4K7jfhSj556jrN6k7skTUEwU0RX+qzZxW03ear\r
42  7fiw==\r
43 X-Gm-Message-State:\r
44  ALoCoQm6WrCfEsRMyrNnV1IE8GCbbofwLCd1rL/PpkfmkdBW+8bOR74DIGTnDjff5RP1kNFM9EcK\r
45 X-Received: by 10.180.75.48 with SMTP id z16mr33577937wiv.2.1439279245888;\r
46  Tue, 11 Aug 2015 00:47:25 -0700 (PDT)\r
47 Received: from localhost (ip-80-226-24-7.vodafone-net.de. [80.226.24.7])\r
48  by smtp.gmail.com with ESMTPSA id w8sm2067732wiy.10.2015.08.11.00.47.23\r
49  (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
50  Tue, 11 Aug 2015 00:47:25 -0700 (PDT)\r
51 From: Daniel Schoepe <daniel@schoepe.org>\r
52 To: notmuch@notmuchmail.org\r
53 Subject: [PATCH 2/2] test: Tests for combining --batch and --remove-all\r
54 Date: Tue, 11 Aug 2015 09:46:38 +0200\r
55 Message-Id: <1439279198-21330-3-git-send-email-daniel@schoepe.org>\r
56 X-Mailer: git-send-email 2.5.0\r
57 In-Reply-To: <1439279198-21330-1-git-send-email-daniel@schoepe.org>\r
58 References: <1439279198-21330-1-git-send-email-daniel@schoepe.org>\r
59 X-BeenThere: notmuch@notmuchmail.org\r
60 X-Mailman-Version: 2.1.18\r
61 Precedence: list\r
62 List-Id: "Use and development of the notmuch mail system."\r
63  <notmuch.notmuchmail.org>\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
65  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
67 List-Post: <mailto:notmuch@notmuchmail.org>\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
70  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
71 X-List-Received-Date: Tue, 11 Aug 2015 07:47:31 -0000\r
72 \r
73 This patch adds some tests for combining --remove-all with --batch or\r
74 --input when calling notmuch-tag.\r
75 ---\r
76  test/T150-tagging.sh | 24 ++++++++++++++++++++++++\r
77  1 file changed, 24 insertions(+)\r
78 \r
79 diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh\r
80 index 821d393..19539dd 100755\r
81 --- a/test/T150-tagging.sh\r
82 +++ b/test/T150-tagging.sh\r
83 @@ -38,6 +38,16 @@ test_expect_equal "$output" "\\r
84  thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One ()\r
85  thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (tag5 tag6 unread)"\r
86  \r
87 +test_begin_subtest "Remove all with batch"\r
88 +notmuch tag --remove-all --batch <<EOF\r
89 ++tag1 -- One\r
90 ++tag3 +tag4 +inbox -- Two\r
91 +EOF\r
92 +output=$(notmuch search \* | notmuch_search_sanitize)\r
93 +test_expect_equal "$output" "\\r
94 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (tag1)\r
95 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag3 tag4)"\r
96 +\r
97  test_begin_subtest "Remove all with a no-op"\r
98  notmuch tag +inbox +tag1 +unread One\r
99  notmuch tag --remove-all +foo +inbox +tag1 -foo +unread Two\r
100 @@ -102,6 +112,20 @@ notmuch search \* | notmuch_search_sanitize > OUTPUT\r
101  notmuch restore --format=batch-tag < backup.tags\r
102  test_expect_equal_file batch.expected OUTPUT\r
103  \r
104 +test_begin_subtest "--batch --input --remove-all"\r
105 +notmuch dump --format=batch-tag > backup.tags\r
106 +notmuch tag +foo +bar -- One\r
107 +notmuch tag +tag7 -- Two\r
108 +notmuch tag --batch --input=batch.in --remove-all\r
109 +notmuch search \* | notmuch_search_sanitize > OUTPUT\r
110 +notmuch restore --format=batch-tag < backup.tags\r
111 +cat > batch_removeall.expected <<EOF\r
112 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (@ tag6)\r
113 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (tag6)\r
114 +EOF\r
115 +test_expect_equal_file batch_removeall.expected OUTPUT\r
116 +rm batch_removeall.expected\r
117 +\r
118  test_begin_subtest "--batch, blank lines and comments"\r
119  notmuch dump | sort > EXPECTED\r
120  notmuch tag --batch <<EOF\r
121 -- \r
122 2.5.0\r
123 \r