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 6C9C4431FC3
\r
6 for <notmuch@notmuchmail.org>; Thu, 6 Dec 2012 17:27:27 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 JZVUtdTcbLxc for <notmuch@notmuchmail.org>;
\r
16 Thu, 6 Dec 2012 17:27:26 -0800 (PST)
\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])
\r
18 (using TLSv1 with cipher AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 6242D431FC9
\r
21 for <notmuch@notmuchmail.org>; Thu, 6 Dec 2012 17:27:13 -0800 (PST)
\r
22 Received: from fctnnbsc30w-142167090129.dhcp-dynamic.fibreop.nb.bellaliant.net
\r
23 ([142.167.90.129] helo=zancas.localnet)
\r
24 by tesseract.cs.unb.ca with esmtpsa
\r
25 (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)
\r
26 (envelope-from <bremner@tethera.net>)
\r
27 id 1Tgmie-0003Nr-8v; Thu, 06 Dec 2012 21:27:12 -0400
\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)
\r
29 (envelope-from <bremner@tethera.net>)
\r
30 id 1TgmiY-0004kO-RT; Thu, 06 Dec 2012 21:27:06 -0400
\r
31 From: david@tethera.net
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [Patch v3b 2/9] test: add sanity check for dump --format=batch-tag.
\r
34 Date: Thu, 6 Dec 2012 21:26:40 -0400
\r
35 Message-Id: <1354843607-17980-3-git-send-email-david@tethera.net>
\r
36 X-Mailer: git-send-email 1.7.10.4
\r
37 In-Reply-To: <1354843607-17980-1-git-send-email-david@tethera.net>
\r
38 References: <1354843607-17980-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: Fri, 07 Dec 2012 01:27:27 -0000
\r
55 From: David Bremner <bremner@debian.org>
\r
57 It's important this does not rely on restore, since it hasn't been
\r
60 test/dump-restore | 13 +++++++++++++
\r
61 1 file changed, 13 insertions(+)
\r
63 diff --git a/test/dump-restore b/test/dump-restore
\r
64 index bf31266..b4c807f 100755
\r
65 --- a/test/dump-restore
\r
66 +++ b/test/dump-restore
\r
67 @@ -85,6 +85,19 @@ test_begin_subtest "dump --output=outfile -- from:cworth"
\r
68 notmuch dump --output=dump-outfile-dash-inbox.actual -- from:cworth
\r
69 test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual
\r
71 +test_begin_subtest "Check for a safe set of message-ids"
\r
72 +notmuch search --output=messages from:cworth | sed s/^id:// > EXPECTED
\r
73 +notmuch search --output=messages from:cworth | sed s/^id:// |\
\r
74 + $TEST_DIRECTORY/hex-xcode --direction=encode > OUTPUT
\r
75 +test_expect_equal_file OUTPUT EXPECTED
\r
77 +test_begin_subtest "format=batch-tag, dump sanity check."
\r
78 +notmuch dump --format=sup from:cworth | cut -f1 -d' ' | \
\r
79 + sort > EXPECTED.$test_count
\r
80 +notmuch dump --format=batch-tag from:cworth | sed 's/^.*-- id://' | \
\r
81 + sort > OUTPUT.$test_count
\r
82 +test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count
\r
84 test_begin_subtest 'roundtripping random message-ids and tags'
\r
85 test_subtest_known_broken
\r
86 ${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} \
\r