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 5D25D431FAF for ; Sun, 19 Feb 2012 12:50:33 -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 C53q9nGIOUNP for ; Sun, 19 Feb 2012 12:50:32 -0800 (PST) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B39A1431FC3 for ; Sun, 19 Feb 2012 12:50:29 -0800 (PST) Received: by mail-wi0-f181.google.com with SMTP id hi8so3110543wib.26 for ; Sun, 19 Feb 2012 12:50:29 -0800 (PST) Received-SPF: pass (google.com: domain of pieter@praet.org designates 10.216.135.169 as permitted sender) client-ip=10.216.135.169; Authentication-Results: mr.google.com; spf=pass (google.com: domain of pieter@praet.org designates 10.216.135.169 as permitted sender) smtp.mail=pieter@praet.org Received: from mr.google.com ([10.216.135.169]) by 10.216.135.169 with SMTP id u41mr3153628wei.13.1329684629358 (num_hops = 1); Sun, 19 Feb 2012 12:50:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=gamma; h=mime-version:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=YfjAm4bbHjAsdJpXBKOPpJ5oIrM1ZW5yVW+iK1n3nZ0=; b=0Nga5HBEwylicvPm11FcFoW5Xnu9LtFuXvxc/QSy0yicJ4DGx5KjBFwQl55viipjI7 w1wXxQtxzvf8l1pqVPnfMfZ2wFcNyjjahkpp7kXpdhXzBJKkn/OTA705RTGAOtS+JB1t gnn765SaBoWSbXO8a0a3qebNP52NN8mPBU4Wk= MIME-Version: 1.0 Received: by 10.216.135.169 with SMTP id u41mr2632482wei.13.1329684629274; Sun, 19 Feb 2012 12:50:29 -0800 (PST) Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be. [81.242.218.104]) by mx.google.com with ESMTPS id dr5sm29364109wib.0.2012.02.19.12.50.28 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Feb 2012 12:50:28 -0800 (PST) From: Pieter Praet To: David Bremner , Tomi Ollila Subject: [PATCH 6/6] test: another test wrt ignoring user-specified files and directories Date: Sun, 19 Feb 2012 21:47:56 +0100 Message-Id: <1329684476-9596-7-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.8.1 In-Reply-To: <1329684476-9596-1-git-send-email-pieter@praet.org> References: <8739a93beq.fsf@zancas.localnet> <1329684476-9596-1-git-send-email-pieter@praet.org> X-Gm-Message-State: ALoCoQk9YDfr08QI2xuxBC66tW6g1HJ5DkcVrjc1gAez3JysjzCwd8y/KbpktSPlsdFjhEHykFha Cc: Notmuch Mail 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: Sun, 19 Feb 2012 20:50:33 -0000 Demonstrates that *every* file/directory which matches one of the values in 'new.ignore' will be ignored, independent of its depth/location in the mail store. --- test/new | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/test/new b/test/new index 79a6c97..a7b7330 100755 --- a/test/new +++ b/test/new @@ -173,5 +173,24 @@ 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_begin_subtest "Ignore files and directories specified in new.ignore (multiple occurrences)" +notmuch config set new.ignore .git ignored_file .ignored_hidden_file +touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan. +mkdir -p "${MAIL_DIR}"/one/two/three/.git +notmuch new > /dev/null # ensure that files/folders will be printed in ASCII order. +touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file +output=$(NOTMUCH_NEW --debug 2>&1) +test_expect_equal "$output" \ +"(D) add_files_recursive, pass 1: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/.git +(D) add_files_recursive, pass 1: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/one/two/three/.git +(D) add_files_recursive, pass 2: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/one/two/three/.git +(D) add_files_recursive, pass 2: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/one/two/three/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/one/two/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/one/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/.git +(D) add_files_recursive, pass 2: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/.ignored_hidden_file +(D) add_files_recursive, pass 2: explicitly ignoring /dev/shm/notmuch/tmp.new/mail/ignored_file +No new mail." + test_done -- 1.7.8.1