--- /dev/null
+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 1ED8D431FBD\r
+ for <notmuch@notmuchmail.org>; Sat, 8 Mar 2014 18:55:43 -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 JkSjhytyuP1b for <notmuch@notmuchmail.org>;\r
+ Sat, 8 Mar 2014 18:55:35 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu\r
+ [18.7.68.35])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 4A3D7431FB6\r
+ for <notmuch@notmuchmail.org>; Sat, 8 Mar 2014 18:55:35 -0800 (PST)\r
+X-AuditID: 12074423-f79726d000000cc9-9f-531bd826da19\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ (using TLS with cipher AES256-SHA (256/256 bits))\r
+ (Client did not present a certificate)\r
+ by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 75.42.03273.628DB135; Sat, 8 Mar 2014 21:55:34 -0500 (EST)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s292tWcx027618; \r
+ Sat, 8 Mar 2014 21:55:33 -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.8/8.12.4) with ESMTP id s292tUjj027962\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+ Sat, 8 Mar 2014 21:55:31 -0500\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1WMTth-0002io-TD; Sat, 08 Mar 2014 21:55:29 -0500\r
+Date: Sat, 8 Mar 2014 21:55:29 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: jani@nikula.org, David Bremner <david@tethera.net>\r
+Subject: Re: [Patch v3 08/15] test: add tests for the new boolean folder: and\r
+ path: prefixes\r
+Message-ID: <20140309025529.GM4709@mit.edu>\r
+References: <1394313585-28422-1-git-send-email-david@tethera.net>\r
+ <1394313585-28422-9-git-send-email-david@tethera.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1394313585-28422-9-git-send-email-david@tethera.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprGKsWRmVeSWpSXmKPExsUixG6nrqt2QzrYYMktYYsbrd2MFk3TnS2u\r
+ 35zJ7MDscev+a3aPZ6tuMXtsOfSeOYA5issmJTUnsyy1SN8ugSujbfofloJtshWn7/I1MLZK\r
+ djFyckgImEjcm3iBDcIWk7hwbz2YLSQwm0li1Tb5LkYuIHsDo8Sr7pXsEM4pJomfU08yQThL\r
+ GCV+zH7GCNLCIqAicWb9dWYQm01AQ2Lb/uVAcQ4OEQEziWnLa0HCzALSEt9+NzOB2MICcRIn\r
+ Xh1jAbF5BbQlmh/uZYLYXCnRvvIwO0RcUOLkzCcsEL1aEjf+vWQCGQkyZ/k/DpAwp4CTxOS9\r
+ O1lBbFGgC6ac3MY2gVFoFpLuWUi6ZyF0L2BkXsUom5JbpZubmJlTnJqsW5ycmJeXWqRrppeb\r
+ WaKXmlK6iREc5C7KOxj/HFQ6xCjAwajEw/tgknSwEGtiWXFl7iFGSQ4mJVHe7utAIb6k/JTK\r
+ jMTijPii0pzU4kOMEhzMSiK8LzuBcrwpiZVVqUX5MClpDhYlcd6+sxLBQgLpiSWp2ampBalF\r
+ MFkZDg4lCd4kkKGCRanpqRVpmTklCGkmDk6Q4TxAw9NAaniLCxJzizPTIfKnGHU55s/694lR\r
+ iCUvPy9VSpxXHKRIAKQoozQPbg4sOb1iFAd6S5i3BaSKB5jY4Ca9AlrCBLSk+bgUyJKSRISU\r
+ VAOj7kf98/+Nb1qdUmbUnH6MaVq52Nb5p8yDbv32ebvISyK5v7M+jklh38mEu2XPfi4V5NM8\r
+ ul9HSuX8nxVLTP00OhcsagraFHn4/84rexnW7Ay8vG5hqcuXshPxv/TYnyrtSP3jvv4kt+El\r
+ 7r0pFc0Z5778cXke1dSmJsos1eyXmK/ZZX5+iW+kEktxRqKhFnNRcSIAlH21ESkDAAA=\r
+Cc: 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, 09 Mar 2014 02:55:43 -0000\r
+\r
+Quoth David Bremner on Mar 08 at 5:19 pm:\r
+> From: Jani Nikula <jani@nikula.org>\r
+> \r
+> Additional tests for the boolean folder: and path: prefixes using the\r
+> new corpus.\r
+> ---\r
+> test/T101-search-by-folder-and-path.sh | 83 ++++++++++++++++++++++++++++++++++\r
+\r
+Would it be possible to fold these in to (or simply improve)\r
+T100-search-by-folder.sh? Maybe just concatenate the two and blow\r
+away the database in the middle. There's already a lot of ambiguity\r
+between the test scripts (do I put Emacs show tests in T310-emacs\r
+where most of them are, or in T450-emacs-show?) and it would be\r
+unfortunate to introduce more.\r
+\r
+> 1 file changed, 83 insertions(+)\r
+> create mode 100755 test/T101-search-by-folder-and-path.sh\r
+> \r
+> diff --git a/test/T101-search-by-folder-and-path.sh b/test/T101-search-by-folder-and-path.sh\r
+> new file mode 100755\r
+> index 0000000..9f809e4\r
+> --- /dev/null\r
+> +++ b/test/T101-search-by-folder-and-path.sh\r
+> @@ -0,0 +1,83 @@\r
+> +#!/usr/bin/env bash\r
+> +test_description='"notmuch search" by folder: and path:'\r
+> +. ./test-lib.sh\r
+> +\r
+> +add_email_corpus folders\r
+> +\r
+> +test_begin_subtest "folder: search"\r
+> +output=$(notmuch search --output=files folder:foo | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
+\r
+No need to do this in this series, but it would be nice if this\r
+canonicalization were put into a function in test-lib, since we do it\r
+in a lot of places.\r
+\r
+> +# bar/baz/05:2, and new/03:2, are duplicates of foo/05:2, and\r
+> +# foo/new/03:2, respectively\r
+> +test_expect_equal "$output" "MAIL_DIR/bar/baz/05:2,\r
+> +MAIL_DIR/foo/05:2,\r
+> +MAIL_DIR/foo/06:2,\r
+> +MAIL_DIR/foo/cur/07:2,\r
+> +MAIL_DIR/foo/cur/08:2,\r
+> +MAIL_DIR/foo/new/03:2,\r
+> +MAIL_DIR/foo/new/09:2,\r
+> +MAIL_DIR/foo/new/10:2,\r
+> +MAIL_DIR/new/03:2,"\r
+> +\r
+> +test_begin_subtest "top level folder: search"\r
+> +output=$(notmuch search --output=files folder:'""' | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
+> +# foo/new/03:2, is a duplicate of new/03:2,\r
+> +test_expect_equal "$output" "MAIL_DIR/01:2,\r
+> +MAIL_DIR/02:2,\r
+> +MAIL_DIR/cur/29:2,\r
+> +MAIL_DIR/cur/30:2,\r
+> +MAIL_DIR/cur/31:2,\r
+> +MAIL_DIR/cur/32:2,\r
+> +MAIL_DIR/cur/33:2,\r
+> +MAIL_DIR/cur/34:2,\r
+> +MAIL_DIR/cur/35:2,\r
+> +MAIL_DIR/cur/36:2,\r
+> +MAIL_DIR/cur/37:2,\r
+> +MAIL_DIR/cur/38:2,\r
+> +MAIL_DIR/cur/39:2,\r
+> +MAIL_DIR/cur/40:2,\r
+> +MAIL_DIR/cur/41:2,\r
+> +MAIL_DIR/cur/42:2,\r
+> +MAIL_DIR/cur/43:2,\r
+> +MAIL_DIR/cur/44:2,\r
+> +MAIL_DIR/cur/45:2,\r
+> +MAIL_DIR/cur/46:2,\r
+> +MAIL_DIR/cur/47:2,\r
+> +MAIL_DIR/cur/48:2,\r
+> +MAIL_DIR/cur/49:2,\r
+> +MAIL_DIR/cur/50:2,\r
+> +MAIL_DIR/cur/52:2,\r
+> +MAIL_DIR/cur/53:2,\r
+> +MAIL_DIR/foo/new/03:2,\r
+> +MAIL_DIR/new/03:2,\r
+> +MAIL_DIR/new/04:2,"\r
+> +\r
+> +test_begin_subtest "path: search"\r
+> +output=$(notmuch search --output=files path:"bar" | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
+> +# foo/05:2, is a duplicate of bar/baz/05:2,\r
+> +test_expect_equal "$output" "MAIL_DIR/bar/17:2,\r
+> +MAIL_DIR/bar/18:2,"\r
+> +\r
+> +test_begin_subtest "top level path: search"\r
+> +output=$(notmuch search --output=files path:'""' | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
+> +test_expect_equal "$output" "MAIL_DIR/01:2,\r
+> +MAIL_DIR/02:2,"\r
+> +\r
+> +test_begin_subtest "recursive path: search"\r
+> +output=$(notmuch search --output=files path:"bar/**" | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
+> +# foo/05:2, is a duplicate of bar/baz/05:2,\r
+> +test_expect_equal "$output" "MAIL_DIR/bar/17:2,\r
+> +MAIL_DIR/bar/18:2,\r
+> +MAIL_DIR/bar/baz/05:2,\r
+> +MAIL_DIR/bar/baz/23:2,\r
+> +MAIL_DIR/bar/baz/24:2,\r
+> +MAIL_DIR/bar/baz/cur/25:2,\r
+> +MAIL_DIR/bar/baz/cur/26:2,\r
+> +MAIL_DIR/bar/baz/new/27:2,\r
+> +MAIL_DIR/bar/baz/new/28:2,\r
+> +MAIL_DIR/bar/cur/19:2,\r
+> +MAIL_DIR/bar/cur/20:2,\r
+> +MAIL_DIR/bar/new/21:2,\r
+> +MAIL_DIR/bar/new/22:2,\r
+> +MAIL_DIR/foo/05:2,"\r
+> +\r
+> +test_done\r