[PATCH 6/6] test: another test wrt ignoring user-specified files and directories
authorPieter Praet <pieter@praet.org>
Sun, 19 Feb 2012 20:47:56 +0000 (21:47 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:42 +0000 (09:44 -0800)
85/802a0328ef5ee45420d3aeef5a13874ebe762a [new file with mode: 0644]

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