Re: [PATCH v6 1/3] test: add tests wrt ignoring user-specified files and directories
authorAustin Clements <amdragon@MIT.EDU>
Tue, 14 Feb 2012 19:18:04 +0000 (14:18 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:29 +0000 (09:44 -0800)
b4/9c9bd4c2528948d82437195757bb513e8f9abd [new file with mode: 0644]

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