1 Return-Path: <bremner@tethera.net>
\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 BDAEA414392
\r
6 for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 17:40:46 -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 j8X0vJLM4+FU for <notmuch@notmuchmail.org>;
\r
16 Sat, 14 Jan 2012 17:40:46 -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 1954D41438E
\r
21 for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 17:40:45 -0800 (PST)
\r
22 Received: from zancas.localnet
\r
23 (fctnnbsc36w-156034076032.pppoe-dynamic.High-Speed.nb.bellaliant.net
\r
24 [156.34.76.32]) (authenticated bits=0)
\r
25 by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id q0F1efIu008571
\r
26 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
\r
27 Sat, 14 Jan 2012 21:40:44 -0400
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.77)
\r
29 (envelope-from <bremner@tethera.net>)
\r
30 id 1RmF5N-00042s-BF; Sat, 14 Jan 2012 21:40:41 -0400
\r
31 From: David Bremner <david@tethera.net>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH v3 05/10] test: add test for dump --format=notmuch
\r
34 Date: Sat, 14 Jan 2012 21:40:19 -0400
\r
35 Message-Id: <1326591624-15493-6-git-send-email-david@tethera.net>
\r
36 X-Mailer: git-send-email 1.7.7.3
\r
37 In-Reply-To: <1326591624-15493-1-git-send-email-david@tethera.net>
\r
38 References: <874nwxbkhr.fsf@zancas.localnet>
\r
39 <1326591624-15493-1-git-send-email-david@tethera.net>
\r
40 Cc: David Bremner <bremner@debian.org>
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Sun, 15 Jan 2012 01:40:47 -0000
\r
55 From: David Bremner <bremner@debian.org>
\r
57 The first test is really to test our assumptions about the corpus,
\r
58 namely that a certain set of message-id's is safe (i.e. doesn't change
\r
59 under hex-escaping). We then check dump output as best we can without
\r
60 functionality-to-come in notmuch-restore.
\r
62 test/dump-restore | 12 ++++++++++++
\r
63 1 files changed, 12 insertions(+), 0 deletions(-)
\r
65 diff --git a/test/dump-restore b/test/dump-restore
\r
66 index 439e998..0e210d3 100755
\r
67 --- a/test/dump-restore
\r
68 +++ b/test/dump-restore
\r
69 @@ -82,4 +82,16 @@ test_begin_subtest "dump outfile -- from:cworth"
\r
70 notmuch dump dump-outfile-dash-inbox.actual -- from:cworth
\r
71 test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual
\r
73 +test_begin_subtest "Check for a safe set of message-ids"
\r
74 +notmuch search --output=messages from:cworth > EXPECTED.$test_count
\r
75 +notmuch search --output=messages from:cworth |\
\r
76 + $TEST_DIRECTORY/hex-xcode --direction=encode > OUTPUT.$test_count
\r
77 +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count
\r
79 +# we have observed that cworth has sane message-ids, and hopefully sane tags.
\r
80 +test_begin_subtest "dump --format=notmuch -- from:cworth"
\r
81 +notmuch dump --format=sup -- from:cworth | tr -d \(\) > EXPECTED.$test_count
\r
82 +notmuch dump --format=notmuch -- from:cworth > OUTPUT.$test_count
\r
83 +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count
\r