Re: [PATCH v4 09/16] index encrypted parts when asked.
[notmuch-archives.git] / 8f / d4ce587a4c0ad2a4d9f5c73ac6ac8687536b29
1 Return-Path: <bgamari.foss@gmail.com>\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 8E602429E26\r
6         for <notmuch@notmuchmail.org>; Wed, 30 Oct 2013 21:10:26 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id REU7d-pezZGj for <notmuch@notmuchmail.org>;\r
17         Wed, 30 Oct 2013 21:10:21 -0700 (PDT)\r
18 Received: from mail-qe0-f51.google.com (mail-qe0-f51.google.com\r
19         [209.85.128.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 242A4431E84\r
22         for <notmuch@notmuchmail.org>; Wed, 30 Oct 2013 21:10:15 -0700 (PDT)\r
23 Received: by mail-qe0-f51.google.com with SMTP id q19so1418037qeb.24\r
24         for <notmuch@notmuchmail.org>; Wed, 30 Oct 2013 21:10:14 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
27         bh=XaoGbO4JtkbsfBzycTgAlL96lzXJRjF8DQkR0xLhrkw=;\r
28         b=lWRPtNd3T4xlke/p7bPEtCdOfT7u+bLqIEpcLBB86ceggl1cG5TmPpNS4Nby13entI\r
29         FyOsI/fs2PQxhDKTsjf8GcyW/+3784Ouab+Pd0VyKjUuDISZbuFfGGC7Y+ZXTfmjIgXY\r
30         quyxN4Uzg2TSGxAPU7wTR5a9x5VgHgXc3z4th2mdsdrHSieLY2SAzl0HOQO2n1ZvcFp/\r
31         J+5Xl+c+FArvpdk/vDBmN+1q2y8sRwB9Xh1amVcOX20hp9cjDBOrcHqYnnYaXhbBcVQe\r
32         /+zqMJooSXcseHWYTsV72x8s2VCi3/+z4uZ03t0+Hp9vVGWOez142phSRI2wqlQSOZFx\r
33         3kQw==\r
34 X-Received: by 10.49.131.39 with SMTP id oj7mr1397590qeb.40.1383192614591;\r
35         Wed, 30 Oct 2013 21:10:14 -0700 (PDT)\r
36 Received: from localhost.localdomain\r
37         (pool-96-240-254-51.spfdma.east.verizon.net. [96.240.254.51])\r
38         by mx.google.com with ESMTPSA id r1sm5129336qam.4.2013.10.30.21.10.13\r
39         for <multiple recipients>\r
40         (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);\r
41         Wed, 30 Oct 2013 21:10:13 -0700 (PDT)\r
42 From: Ben Gamari <bgamari.foss@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH 1/4] test: Add compact test\r
45 Date: Thu, 31 Oct 2013 00:10:08 -0400\r
46 Message-Id: <1383192608-31047-1-git-send-email-bgamari.foss@gmail.com>\r
47 X-Mailer: git-send-email 1.8.3.2\r
48 In-Reply-To: <id:m24n80qqy2.fsf@guru.guru-group.fi>\r
49 References: <id:m24n80qqy2.fsf@guru.guru-group.fi>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Thu, 31 Oct 2013 04:10:26 -0000\r
63 \r
64 Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>\r
65 ---\r
66  test/compact      | 32 ++++++++++++++++++++++++++++++++\r
67  test/notmuch-test |  1 +\r
68  2 files changed, 33 insertions(+)\r
69  create mode 100755 test/compact\r
70 \r
71 diff --git a/test/compact b/test/compact\r
72 new file mode 100755\r
73 index 0000000..5bb5cea\r
74 --- /dev/null\r
75 +++ b/test/compact\r
76 @@ -0,0 +1,32 @@\r
77 +#!/usr/bin/env bash\r
78 +test_description='"notmuch compact"'\r
79 +. ./test-lib.sh\r
80 +\r
81 +add_message '[subject]=One'\r
82 +add_message '[subject]=Two'\r
83 +add_message '[subject]=Three'\r
84 +\r
85 +notmuch tag +tag1 \*\r
86 +notmuch tag +tag2 subject:Two\r
87 +notmuch tag -tag1 +tag3 subject:Three\r
88 +\r
89 +test_expect_success "Running compact" "notmuch compact"\r
90 +\r
91 +test_begin_subtest "Compact preserves database"\r
92 +output=$(notmuch search \* | notmuch_search_sanitize)\r
93 +test_expect_equal "$output" "\\r
94 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)\r
95 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)\r
96 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"\r
97 +\r
98 +test_begin_subtest "Restoring backup"\r
99 +rm -Rf ${TEST_TMPDIR}/mail/xapian\r
100 +mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian\r
101 +\r
102 +output=$(notmuch search \* | notmuch_search_sanitize)\r
103 +test_expect_equal "$output" "\\r
104 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)\r
105 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)\r
106 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"\r
107 +\r
108 +test_done\r
109 diff --git a/test/notmuch-test b/test/notmuch-test\r
110 index aa28bb0..ec94baf 100755\r
111 --- a/test/notmuch-test\r
112 +++ b/test/notmuch-test\r
113 @@ -19,6 +19,7 @@ cd $(dirname "$0")\r
114  TESTS="\r
115    basic\r
116    help-test\r
117 +  compact\r
118    config\r
119    setup\r
120    new\r
121 -- \r
122 1.8.3.2\r
123 \r