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 39DF6431FAF for ; Fri, 12 Oct 2012 12:33:06 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 c7MamY-U+sGQ for ; Fri, 12 Oct 2012 12:33:05 -0700 (PDT) Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 8B5B8431FAE for ; Fri, 12 Oct 2012 12:33:05 -0700 (PDT) Received: by mail-qa0-f53.google.com with SMTP id s11so128327qaa.5 for ; Fri, 12 Oct 2012 12:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=c2fJdbyc2jGvijfi07KBncel1UkTHtNk1BlqcDQnr3o=; b=OT60R7mB8NTlbSy/Yw1+/DpQnX5/dkdTESuDmES+Or//V6UU09mmAcFEjD5Y3WQhEg Q9JTZZ9vmBbxSDVd9GkLzMuCGer1T6Y6KLvbfkziavGHiZFErD6U2r7QTsEH1h9NjiJ+ 3UCWv9GFeNieBUor1PWXiSkVZ43hYXj0nqY+rx1XBg3cVqUazpCwcLH7S8yHMfXeS7cO ieQLwVF74acTsVfuFzSkpHvXZ9KWOqOzacXNTUWjMcQNQ7hcwZf9ECPL/TA2MH4vf0Ah Xqe93BUmy2U3GAYNP+LfdxTQ3yx1V0sbD+gNg50d4+uM6BLPa8wUTDHI+xbCgAD8BGsx D9NA== Received: by 10.49.104.129 with SMTP id ge1mr11818031qeb.62.1350070384878; Fri, 12 Oct 2012 12:33:04 -0700 (PDT) Received: from smtp.gmail.com (p70-80.acedsl.com. [66.114.70.80]) by mx.google.com with ESMTPS id o10sm7991810qaj.14.2012.10.12.12.33.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 12:33:03 -0700 (PDT) From: Ethan Glasser-Camp To: notmuch@notmuchmail.org Subject: [PATCH] test: another test wrt ignoring user-specified files and directories Date: Fri, 12 Oct 2012 15:32:38 -0400 Message-Id: <1350070358-28445-1-git-send-email-ethan@betacantrips.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <87d326dat6.fsf@zancas.localnet> References: <87d326dat6.fsf@zancas.localnet> Cc: Ethan Glasser-Camp , Pieter Praet 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: Fri, 12 Oct 2012 19:33:06 -0000 From: Pieter Praet 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. Signed-off-by: Ethan Glasser-Camp --- This is the trivial modification of Pieter's patch that makes it work no matter where your test directory is. test/new | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/new b/test/new index cab7c01..cc2af72 100755 --- a/test/new +++ b/test/new @@ -183,5 +183,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 ${MAIL_DIR}/.git +(D) add_files_recursive, pass 1: explicitly ignoring ${MAIL_DIR}/one/two/three/.git +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/.git +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/three/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/two/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/one/ignored_file +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.git +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/.ignored_hidden_file +(D) add_files_recursive, pass 2: explicitly ignoring ${MAIL_DIR}/ignored_file +No new mail." + test_done -- 1.7.9.5