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 5BE3A429E44
\r
6 for <notmuch@notmuchmail.org>; Sun, 27 Oct 2013 13:30:23 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 vghb8JEe7-1M for <notmuch@notmuchmail.org>;
\r
17 Sun, 27 Oct 2013 13:30:18 -0700 (PDT)
\r
18 Received: from mail-qa0-f48.google.com (mail-qa0-f48.google.com
\r
19 [209.85.216.48]) (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 31C6D431FDA
\r
22 for <notmuch@notmuchmail.org>; Sun, 27 Oct 2013 13:30:18 -0700 (PDT)
\r
23 Received: by mail-qa0-f48.google.com with SMTP id k4so1698011qaq.14
\r
24 for <notmuch@notmuchmail.org>; Sun, 27 Oct 2013 13:30:17 -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;
\r
27 bh=AGdUOLDlmRscfTbD7v1hQxh0Ss9J0Kiu5LV2eJ7vLrU=;
\r
28 b=oBVE+ZMGOjMsNUaQdA0z64LxRxxxZiI8QAeaRGKF+fZRloLUfM0Y8+iQvUpt4dHkz7
\r
29 pn5TYWQtmvJiLirWtm+fFfRWjtBv+0RTUWy5EU/uJZI5fr7S2EiEmLzMyaq6MDAlZoNb
\r
30 /ZSmRmjJNvQ1miRX4LIRY9hPY7js0wDnr57xRhvFwVkuTGI9yUOSdM9GQ5CUjnUiYfcE
\r
31 E2WosGMssU8ePTCq+Ly7cs7KCS4ePWSiL5xQ6ENqq4iVOJiPvnUizI7Pb4EUmfkEr2xr
\r
32 WFkGUtu6PQymiIeRjGWpICHkQyaStdTNFlRBcZrNcp/0BZOGtYE4iiBPsy085naeWlqL
\r
34 X-Received: by 10.49.127.179 with SMTP id nh19mr24500643qeb.1.1382905817620;
\r
35 Sun, 27 Oct 2013 13:30:17 -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 x1sm45270525qai.6.2013.10.27.13.30.16
\r
39 for <multiple recipients>
\r
40 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
\r
41 Sun, 27 Oct 2013 13:30:17 -0700 (PDT)
\r
42 From: Ben Gamari <bgamari.foss@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH 1/3] test: Add compact test
\r
45 Date: Sun, 27 Oct 2013 16:30:05 -0400
\r
46 Message-Id: <1382905807-22220-1-git-send-email-bgamari.foss@gmail.com>
\r
47 X-Mailer: git-send-email 1.8.3.2
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Sun, 27 Oct 2013 20:30:23 -0000
\r
62 Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
\r
64 test/compact | 35 +++++++++++++++++++++++++++++++++++
\r
65 test/notmuch-test | 1 +
\r
66 2 files changed, 36 insertions(+)
\r
67 create mode 100755 test/compact
\r
69 diff --git a/test/compact b/test/compact
\r
70 new file mode 100755
\r
71 index 0000000..54e85ab
\r
75 +#!/usr/bin/env bash
\r
76 +test_description='"notmuch compact"'
\r
79 +add_message '[subject]=One'
\r
80 +add_message '[subject]=Two'
\r
81 +add_message '[subject]=Three'
\r
83 +notmuch tag +tag1 \*
\r
84 +notmuch tag +tag2 subject:Two
\r
85 +notmuch tag -tag1 +tag3 subject:Three
\r
87 +test_begin_subtest "Compacting"
\r
89 +test_expect_success "compact" "notmuch compact"
\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
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
103 +output=$(notmuch search \* | notmuch_search_sanitize)
\r
104 +test_expect_equal "$output" "\
\r
105 +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
\r
106 +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)
\r
107 +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"
\r
110 diff --git a/test/notmuch-test b/test/notmuch-test
\r
111 index aa28bb0..ec94baf 100755
\r
112 --- a/test/notmuch-test
\r
113 +++ b/test/notmuch-test
\r
114 @@ -19,6 +19,7 @@ cd $(dirname "$0")
\r