Re: [PATCH v4 3/5] Use the S-Expression structured printer in notmuch-show, notmuch...
[notmuch-archives.git] / fc / b27f901c3324a580ea71a6c8d63ecc198ef66c
1 Return-Path: <too@guru.guru-group.fi>\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 37482431E82\r
6         for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:17:37 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 dAa0VgLeV4V5 for <notmuch@notmuchmail.org>;\r
16         Wed, 15 Feb 2012 01:17:35 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
18         by olra.theworths.org (Postfix) with ESMTP id 1898C431FBD\r
19         for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:17:35 -0800 (PST)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id B4C2A68056; Wed, 15 Feb 2012 11:17:36 +0200 (EET)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH v7 1/3] test: add tests wrt ignoring user-specified files and\r
25         directories\r
26 Date: Wed, 15 Feb 2012 11:17:30 +0200\r
27 Message-Id: <1329297452-20852-2-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.7.6.1\r
29 In-Reply-To: <1329297452-20852-1-git-send-email-tomi.ollila@iki.fi>\r
30 References: <1315949524-4948-1-git-send-email-tomi.ollila@iki.fi>\r
31         <1329297452-20852-1-git-send-email-tomi.ollila@iki.fi>\r
32 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.13\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37         <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Wed, 15 Feb 2012 09:17:37 -0000\r
46 \r
47 Files and directories which are specified in 'new.ignore' in the\r
48 config file shouldn't be indexed nor reported by `notmuch new'.\r
49 \r
50 This is basically Pieter's work with Austin's comments addressed.\r
51 ---\r
52  test/new |   22 ++++++++++++++++++++++\r
53  1 files changed, 22 insertions(+), 0 deletions(-)\r
54 \r
55 diff --git a/test/new b/test/new\r
56 index 49f390d..e453684 100755\r
57 --- a/test/new\r
58 +++ b/test/new\r
59 @@ -153,4 +153,26 @@ rm -rf "${MAIL_DIR}"/two\r
60  output=$(NOTMUCH_NEW)\r
61  test_expect_equal "$output" "No new mail. Removed 3 messages."\r
62  \r
63 +# This test requires that notmuch new has been run at least once.\r
64 +test_begin_subtest "Skip and report non-mail files"\r
65 +generate_message\r
66 +mkdir -p "${MAIL_DIR}"/.git && touch "${MAIL_DIR}"/.git/config\r
67 +touch "${MAIL_DIR}"/ignored_file\r
68 +touch "${MAIL_DIR}"/.ignored_hidden_file\r
69 +output=$(NOTMUCH_NEW 2>&1)\r
70 +test_expect_equal "$output" \\r
71 +"Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config\r
72 +Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file\r
73 +Note: Ignoring non-mail file: ${MAIL_DIR}/ignored_file\r
74 +Added 1 new message to the database."\r
75 +\r
76 +test_begin_subtest "Ignore files and directories specified in new.ignore"\r
77 +test_subtest_known_broken\r
78 +generate_message\r
79 +notmuch config set new.ignore .git ignored_file .ignored_hidden_file\r
80 +touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan.\r
81 +output=$(NOTMUCH_NEW 2>&1)\r
82 +test_expect_equal "$output" "Added 1 new message to the database."\r
83 +\r
84 +\r
85  test_done\r
86 -- \r
87 1.7.8.2\r
88 \r