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 D74D1429E30
\r
6 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 12:28:19 -0800 (PST)
\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 35xt52xzSjRk for <notmuch@notmuchmail.org>;
\r
16 Tue, 13 Dec 2011 12:28:18 -0800 (PST)
\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 EF19D429E25
\r
21 for <notmuch@notmuchmail.org>; Tue, 13 Dec 2011 12:28:17 -0800 (PST)
\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 pBDKSAHp002927;
\r
24 Tue, 13 Dec 2011 16:28:10 -0400
\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 1RaYxO-0001xQ-Fw; Tue, 13 Dec 2011 16:28:10 -0400
\r
28 From: David Bremner <david@tethera.net>
\r
29 To: notmuch@notmuchmail.org
\r
30 Subject: [Alpha PATCH 4/6] test: add test for dump --format=notmuch
\r
31 Date: Tue, 13 Dec 2011 16:27:53 -0400
\r
32 Message-Id: <1323808075-7417-5-git-send-email-david@tethera.net>
\r
33 X-Mailer: git-send-email 1.7.5.4
\r
34 In-Reply-To: <1323808075-7417-1-git-send-email-david@tethera.net>
\r
35 References: <1323808075-7417-1-git-send-email-david@tethera.net>
\r
36 Cc: David Bremner <bremner@debian.org>, pere@hungry.com
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Tue, 13 Dec 2011 20:28:20 -0000
\r
51 From: David Bremner <bremner@debian.org>
\r
53 The first test is really to test our assumptions about the corpus,
\r
54 namely that a certain set of message-id's is safe (i.e. doesn't change
\r
55 under hex-escaping). We then check dump output as best we can without
\r
56 functionality-to-come in notmuch-restore.
\r
58 test/dump-restore | 12 ++++++++++++
\r
59 1 files changed, 12 insertions(+), 0 deletions(-)
\r
61 diff --git a/test/dump-restore b/test/dump-restore
\r
62 index 439e998..48caf4e 100755
\r
63 --- a/test/dump-restore
\r
64 +++ b/test/dump-restore
\r
65 @@ -82,4 +82,16 @@ test_begin_subtest "dump outfile -- from:cworth"
\r
66 notmuch dump dump-outfile-dash-inbox.actual -- from:cworth
\r
67 test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual
\r
69 +test_begin_subtest "Check for a safe set of message-ids"
\r
70 +notmuch search --output=messages from:cworth > EXPECTED.$test_count
\r
71 +notmuch search --output=messages from:cworth |\
\r
72 + $TEST_DIRECTORY/hex-xcode e > OUTPUT.$test_count
\r
73 +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count
\r
75 +# we have observed that cworth has sane message-ids, and hopefully sane tags.
\r
76 +test_begin_subtest "dump --format=notmuch -- from:cworth"
\r
77 +notmuch dump --format=sup -- from:cworth | tr -d \(\) > EXPECTED.$test_count
\r
78 +notmuch dump --format=notmuch -- from:cworth > OUTPUT.$test_count
\r
79 +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count
\r