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 131DF6DE0B2F
\r
6 for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 01:03:12 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\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
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 14Vrfa4YKukE for <notmuch@notmuchmail.org>;
\r
19 Tue, 11 Aug 2015 01:03:09 -0700 (PDT)
\r
20 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com
\r
22 by arlo.cworth.org (Postfix) with ESMTPS id 0CB776DE0AC2
\r
23 for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 01:03:09 -0700 (PDT)
\r
24 Received: by wibhh20 with SMTP id hh20so183144776wib.0
\r
25 for <notmuch@notmuchmail.org>; Tue, 11 Aug 2015 01:03:07 -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=FroRYUll4p5Qp9tEv81+wtAX05m5InV1TnxITHVLnW0=;
\r
29 b=K17SfHqKMRlQ4pUOsKC+vQusvTCf8X1p8J92fhTEE+rIEme7zuoMXIs40jZr7NkfvQ
\r
30 tYOHJKTPO2wMOHoYbomhIcqGpzbvzs/COwt27N3FywuTbN6T60aRHCRA5QbWpdzOisWE
\r
31 zMaRrphyRV54YqcSc88XWYcUvXKxK1WZ+BPL0=
\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
36 bh=FroRYUll4p5Qp9tEv81+wtAX05m5InV1TnxITHVLnW0=;
\r
37 b=crHlgPrWI4ihm7nI5uaM3hRgEaE9HAtp42vDEcJzoZYztF3RnJ5FcG6FSEZxujGXC9
\r
38 zqqSjNLwM73a5xWzLi2Hd8iOtuCC1axWSV3hZIqsGpf1w8aCCKsr5aDGCGE9ONyxiGMB
\r
39 f3bRZnxNH4a5WyU/Kh/017b0XiPJYYdL3I4uXWbUjvtey1S6QMX9Mj0xEmudOnde4kAo
\r
40 inNgQw9YGHezuJw8Qp+HFkNmqLUXtWkBi+0idW9H7M615m1fXkabm4WmxG4uIrzBlY2n
\r
41 PN8be1hre8is/uxz8ZfaAkKGm5QUDiIJwYcBY+1EXAo3dtP06zLwCC19gOruhn0Kzqlu
\r
44 ALoCoQldnY9HeBJoKciglmljw9lxHGVgkEmxQ/Az6WMchjNPdtpdpP2/TNxAbVPbCpaA7yIDNU+h
\r
45 X-Received: by 10.180.90.209 with SMTP id by17mr34426561wib.60.1439280187581;
\r
46 Tue, 11 Aug 2015 01:03:07 -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 ny7sm17629936wic.11.2015.08.11.01.03.04
\r
49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
50 Tue, 11 Aug 2015 01:03:06 -0700 (PDT)
\r
51 From: Daniel Schoepe <daniel@schoepe.org>
\r
52 To: notmuch@notmuchmail.org
\r
53 Subject: [PATCH] test: Tests for combining --batch and --remove-all
\r
54 Date: Tue, 11 Aug 2015 10:02:16 +0200
\r
55 Message-Id: <1439280136-25465-2-git-send-email-daniel@schoepe.org>
\r
56 X-Mailer: git-send-email 2.5.0
\r
57 In-Reply-To: <1439280136-25465-1-git-send-email-daniel@schoepe.org>
\r
58 References: <id:1439279198-21330-3-git-send-email-daniel@schoepe.org>
\r
59 <1439280136-25465-1-git-send-email-daniel@schoepe.org>
\r
60 X-BeenThere: notmuch@notmuchmail.org
\r
61 X-Mailman-Version: 2.1.18
\r
63 List-Id: "Use and development of the notmuch mail system."
\r
64 <notmuch.notmuchmail.org>
\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
68 List-Post: <mailto:notmuch@notmuchmail.org>
\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
72 X-List-Received-Date: Tue, 11 Aug 2015 08:03:12 -0000
\r
74 This patch adds some tests for combining --remove-all with --batch or
\r
75 --input when calling notmuch-tag.
\r
77 test/T150-tagging.sh | 25 +++++++++++++++++++++++++
\r
78 1 file changed, 25 insertions(+)
\r
80 diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh
\r
81 index 821d393..8adcabc 100755
\r
82 --- a/test/T150-tagging.sh
\r
83 +++ b/test/T150-tagging.sh
\r
84 @@ -38,6 +38,17 @@ test_expect_equal "$output" "\
\r
85 thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One ()
\r
86 thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (tag5 tag6 unread)"
\r
88 +test_begin_subtest "Remove all with batch"
\r
89 +notmuch tag +tag1 One
\r
90 +notmuch tag --remove-all --batch <<EOF
\r
92 ++tag3 +tag4 +inbox -- Two
\r
94 +output=$(notmuch search \* | notmuch_search_sanitize)
\r
95 +test_expect_equal "$output" "\
\r
96 +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One ()
\r
97 +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag3 tag4)"
\r
99 test_begin_subtest "Remove all with a no-op"
\r
100 notmuch tag +inbox +tag1 +unread One
\r
101 notmuch tag --remove-all +foo +inbox +tag1 -foo +unread Two
\r
102 @@ -102,6 +113,20 @@ notmuch search \* | notmuch_search_sanitize > OUTPUT
\r
103 notmuch restore --format=batch-tag < backup.tags
\r
104 test_expect_equal_file batch.expected OUTPUT
\r
106 +test_begin_subtest "--batch --input --remove-all"
\r
107 +notmuch dump --format=batch-tag > backup.tags
\r
108 +notmuch tag +foo +bar -- One
\r
109 +notmuch tag +tag7 -- Two
\r
110 +notmuch tag --batch --input=batch.in --remove-all
\r
111 +notmuch search \* | notmuch_search_sanitize > OUTPUT
\r
112 +notmuch restore --format=batch-tag < backup.tags
\r
113 +cat > batch_removeall.expected <<EOF
\r
114 +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (@ tag6)
\r
115 +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (tag6)
\r
117 +test_expect_equal_file batch_removeall.expected OUTPUT
\r
118 +rm batch_removeall.expected
\r
120 test_begin_subtest "--batch, blank lines and comments"
\r
121 notmuch dump | sort > EXPECTED
\r
122 notmuch tag --batch <<EOF
\r