1 Return-Path: <bremner@pivot.cs.unb.ca>
\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 E03A7431FD0
\r
6 for <notmuch@notmuchmail.org>; Fri, 21 Oct 2011 12:48:12 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id U5vkqUHZTQMq for <notmuch@notmuchmail.org>;
\r
16 Fri, 21 Oct 2011 12:48:11 -0700 (PDT)
\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])
\r
18 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 44D29429E26
\r
21 for <notmuch@notmuchmail.org>; Fri, 21 Oct 2011 12:48:11 -0700 (PDT)
\r
22 Received: from convex-new.cs.unb.ca ([131.202.13.154])
\r
23 by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p9LJm4Ci002202;
\r
24 Fri, 21 Oct 2011 16:48:07 -0300
\r
25 Received: from bremner by convex-new.cs.unb.ca with local (Exim 4.72)
\r
26 (envelope-from <bremner@pivot.cs.unb.ca>)
\r
27 id 1RHL4W-00016T-RB; Fri, 21 Oct 2011 16:48:04 -0300
\r
28 From: David Bremner <david@tethera.net>
\r
29 To: notmuch@notmuchmail.org
\r
30 Subject: [PATCH 3/6] test/dump-restore: add tests for restore --accumulate
\r
31 Date: Fri, 21 Oct 2011 16:47:54 -0300
\r
32 Message-Id: <1319226477-4181-4-git-send-email-david@tethera.net>
\r
33 X-Mailer: git-send-email 1.7.5.4
\r
34 In-Reply-To: <1319226477-4181-1-git-send-email-david@tethera.net>
\r
35 References: <1317317857-29636-1-git-send-email-thomas@schwinge.name>
\r
36 <1319226477-4181-1-git-send-email-david@tethera.net>
\r
37 Cc: David Bremner <bremner@debian.org>
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Fri, 21 Oct 2011 19:48:13 -0000
\r
52 From: David Bremner <bremner@debian.org>
\r
54 Flesh out what ``notmuch restore --accumulate'' is supposed to do.
\r
55 Its tests are currently XFAILed; the functionality will be added in
\r
58 Based on a patch by Thomas Schwinge:
\r
60 id:"1317317811-29540-1-git-send-email-thomas@schwinge.name"
\r
62 test/dump-restore | 27 +++++++++++++++++++++++++++
\r
63 1 files changed, 27 insertions(+), 0 deletions(-)
\r
65 diff --git a/test/dump-restore b/test/dump-restore
\r
66 index 502fb82..276dd6f 100755
\r
67 --- a/test/dump-restore
\r
68 +++ b/test/dump-restore
\r
69 @@ -9,12 +9,27 @@ test_expect_success 'Dumping all tags' \
\r
71 notmuch dump > dump.expected'
\r
73 +# The use of from:cworth is rather arbitrary: it matches some of the
\r
74 +# email corpus' messages, but not all of them.
\r
76 +test_expect_success 'Dumping all tags II' \
\r
77 + 'notmuch tag +ABC +DEF -- from:cworth &&
\r
78 + notmuch dump > dump-ABC_DEF.expected &&
\r
79 + ! cmp dump.expected dump-ABC_DEF.expected'
\r
81 test_expect_success 'Clearing all tags' \
\r
82 'sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected &&
\r
83 notmuch restore clear.expected &&
\r
84 notmuch dump > clear.actual &&
\r
85 test_cmp clear.expected clear.actual'
\r
87 +test_subtest_known_broken # missing --accumuluate
\r
88 +test_expect_success 'Accumulate original tags' \
\r
89 + 'notmuch tag +ABC +DEF -- from:cworth &&
\r
90 + notmuch restore --accumulate < dump.expected &&
\r
91 + notmuch dump > dump.actual &&
\r
92 + test_cmp dump-ABC_DEF.expected dump.actual'
\r
94 test_expect_success 'Restoring original tags' \
\r
95 'notmuch restore dump.expected &&
\r
96 notmuch dump > dump.actual &&
\r
97 @@ -25,6 +40,18 @@ test_expect_success 'Restore with nothing to do' \
\r
98 notmuch dump > dump.actual &&
\r
99 test_cmp dump.expected dump.actual'
\r
101 +test_subtest_known_broken # missing --accumuluate
\r
102 +test_expect_success 'Restore with nothing to do, II' \
\r
103 + 'notmuch restore --accumulate dump.expected &&
\r
104 + notmuch dump > dump.actual &&
\r
105 + test_cmp dump.expected dump.actual'
\r
107 +test_subtest_known_broken # missing --accumuluate
\r
108 +test_expect_success 'Restore with nothing to do, III' \
\r
109 + 'notmuch restore --accumulate < clear.expected &&
\r
110 + notmuch dump > dump.actual &&
\r
111 + test_cmp dump.expected dump.actual'
\r
113 # notmuch restore currently only considers the first argument.
\r
114 test_subtest_known_broken
\r
115 test_expect_success 'Invalid restore invocation' \
\r