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 2D5BC429E2F
\r
6 for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 05:15:49 -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 B0RqIon4gdyc for <notmuch@notmuchmail.org>;
\r
16 Sun, 18 Dec 2011 05:15:47 -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 2602D429E31
\r
21 for <notmuch@notmuchmail.org>; Sun, 18 Dec 2011 05:15:43 -0800 (PST)
\r
22 Received: from zancas.localnet
\r
23 (fctnnbsc36w-156034079193.pppoe-dynamic.High-Speed.nb.bellaliant.net
\r
24 [156.34.79.193]) (authenticated bits=0)
\r
25 by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id pBIDFd9e017880
\r
26 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
\r
27 Sun, 18 Dec 2011 09:15:39 -0400
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.77)
\r
29 (envelope-from <bremner@tethera.net>)
\r
30 id 1RcGaY-0008RP-Ni; Sun, 18 Dec 2011 09:15:38 -0400
\r
31 From: David Bremner <david@tethera.net>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH Draft 2 5/9] test: add test for dump --format=notmuch
\r
34 Date: Sun, 18 Dec 2011 09:15:07 -0400
\r
35 Message-Id: <1324214111-32079-6-git-send-email-david@tethera.net>
\r
36 X-Mailer: git-send-email 1.7.7.3
\r
37 In-Reply-To: <1324214111-32079-1-git-send-email-david@tethera.net>
\r
38 References: <id:87sjkmuck7.fsf@gmail.com>
\r
39 <1324214111-32079-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, 18 Dec 2011 13:15:50 -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..48caf4e 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 e > 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