From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 8455C431FBD for ; Tue, 14 Feb 2012 11:19:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VIzPGQDKfkGN for ; Tue, 14 Feb 2012 11:19:43 -0800 (PST) Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU [18.7.68.36]) by olra.theworths.org (Postfix) with ESMTP id A2034431FBC for ; Tue, 14 Feb 2012 11:19:43 -0800 (PST) X-AuditID: 12074424-b7fae6d000000906-f0-4f3ab3cfaf46 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP id 7E.8E.02310.FC3BA3F4; Tue, 14 Feb 2012 14:19:43 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q1EJJg9h003057; Tue, 14 Feb 2012 14:19:42 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1EJJeIm014274 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Tue, 14 Feb 2012 14:19:41 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RxNt6-0006Ak-VT; Tue, 14 Feb 2012 14:18:05 -0500 From: Austin Clements To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH v6 1/3] test: add tests wrt ignoring user-specified files and directories In-Reply-To: <1328520505-26382-1-git-send-email-tomi.ollila@iki.fi> References: <1315949524-4948-1-git-send-email-tomi.ollila@iki.fi> <1328520505-26382-1-git-send-email-tomi.ollila@iki.fi> User-Agent: Notmuch/0.11.1+166~gd2ef4ed (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Date: Tue, 14 Feb 2012 14:18:04 -0500 Message-ID: <87bop1cjgz.fsf@awakening.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsUixG6nrnt+s5W/wfubrBbXb85ktnizch6r A5PH4a8LWTyerbrFHMAUxWWTkpqTWZZapG+XwJVx+8kFtoLtfBV7P81mamDs4Oli5OSQEDCR 2PmrgxXCFpO4cG89WxcjF4eQwD5GiX9dD9ghnA2MErsm3YPKnGSSuNnzGiqzhFFi1f9djCD9 bAIaEtv2LwezRQRsJa4sOQk2l1lARWL1o/nsILawQKzErs7PzCA2p4CzRMOu62BxIYEKiZud u1hAbFGBRIlpu3aB1bAIqEosmXGfDcTmBbp136GvTBC2oMTJmU9YIOZrSdz495JpAqPgLCSp WUhSCxiZVjHKpuRW6eYmZuYUpybrFicn5uWlFuma6+VmluilppRuYgQHq4vKDsbmQ0qHGAU4 GJV4eA0sLP2FWBPLiitzDzFKcjApifIybLDyF+JLyk+pzEgszogvKs1JLT7EKMHBrCTCu2k6 UI43JbGyKrUoHyYlzcGiJM6rofXOT0ggPbEkNTs1tSC1CCYrw8GhJMH7cBNQo2BRanpqRVpm TglCmomDE2Q4D9Dw1yA1vMUFibnFmekQ+VOMilLivLdBEgIgiYzSPLheWDJ5xSgO9Iow726Q Kh5gIoLrfgU0mAlo8PbTFiCDSxIRUlINjMavxOdcMtx9L+DbUqGJZ/LN/Zz5/BbGfjh6+6/8 dPens1iab2ierOHf//2jPst7ofnn+9/mMG88wPj09ZwSi6nTXzhph/dukbGXCsp4WX3mnsTT 6grtHp41qaU9FX/8/myQ73+1zm1eKmf0ZzGVxjW7DxqtP1iSeTXcaY7u3/7Ci7cuyV/udlRi Kc5INNRiLipOBAC9vb1FAQMAAA== Cc: Tomi Ollila X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2012 19:19:44 -0000 On Mon, 6 Feb 2012 11:28:23 +0200, Tomi Ollila wrote: > Files and directories which are specified in 'new.ignore' in the > config file shouldn't be indexed nor reported by `notmuch new'. > > This is basically Pieter's work with Austin's comments addressed. > --- > test/new | 22 ++++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > > diff --git a/test/new b/test/new > index 49f390d..5ce8811 100755 > --- a/test/new > +++ b/test/new > @@ -153,4 +153,26 @@ rm -rf "${MAIL_DIR}"/two > output=$(NOTMUCH_NEW) > test_expect_equal "$output" "No new mail. Removed 3 messages." > > +# This test depends that notmuch new has been run at least once. s/depends/requires/ > +test_begin_subtest "Skip and report non-mail files" > +generate_message > +mkdir -p "${MAIL_DIR}"/.git && touch "${MAIL_DIR}"/.git/config > +touch "${MAIL_DIR}"/ignored_file > +touch "${MAIL_DIR}"/.ignored_hidden_file > +output=$(NOTMUCH_NEW 2>&1) > +test_expect_equal "$output" \ > +"Note: Ignoring non-mail file: ${MAIL_DIR}/.git/config > +Note: Ignoring non-mail file: ${MAIL_DIR}/.ignored_hidden_file > +Note: Ignoring non-mail file: ${MAIL_DIR}/ignored_file > +Added 1 new message to the database." > + > +test_begin_subtest "Ignore files and directories specified in new.ignore" > +test_subtest_known_broken > +generate_message > +notmuch config set new.ignore .git ignored_file .ignored_hidden_file > +touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan. > +output=$(NOTMUCH_NEW 2>&1) > +test_expect_equal "$output" "Added 1 new message to the database." > + > + > test_done > -- > 1.7.6.5 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch >