--- /dev/null
+Return-Path: <jani@nikula.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 B67DE431FDA\r
+ for <notmuch@notmuchmail.org>; Thu, 9 Jan 2014 23:23:05 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\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 KK7a2mkT2qLm for <notmuch@notmuchmail.org>;\r
+ Thu, 9 Jan 2014 23:22:59 -0800 (PST)\r
+Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com\r
+ [74.125.83.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 9C529431FDC for <notmuch@notmuchmail.org>; Thu, 9 Jan 2014 23:22:56 -0800\r
+ (PST)\r
+Received: by mail-ee0-f50.google.com with SMTP id c41so1703229eek.37\r
+ for <notmuch@notmuchmail.org>; Thu, 09 Jan 2014 23:22:55 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references:in-reply-to:references;\r
+ bh=tFuV44LnXbpaW3axJ9yoYhlWmqMYYtxb0UCw1CgQYXQ=;\r
+ b=cm4MSbrnxq+BmVR+6FMShdO2YXdCWquKYmomEe32dA8qz/22iwljhH5GLeQRZqoAu8\r
+ T+O5JkF1mR53+xennK2QV+KiKf8lqVcyfGgbSBgzwKG4pJEtuIt+mqUZmHPAqDyX1xJA\r
+ ojxrECp34XbLj7VV7L9XYM//oGw0iN5ZG1SwtaxNNndPrVVD/dRIagwahAOxaJdQssOZ\r
+ zFuFsv0Aj23BZ5nOuvHhXAOBgDkPe0yxM2/yeyPTxWgxHHu8Ye1BkxfHDcdmxCR4UNrn\r
+ kO6GeM6pfMOr3LaohbP4Vg1+yZHrjucXoaXYTkgxE59JHiXED1LAGp+j9aa58R7nhCx0\r
+ PS3A==\r
+X-Gm-Message-State:\r
+ ALoCoQk5qfz/DC6eG8kTHTlzVyRSDT3+Xpd81j3dgGX1G2xWfTiDm0DhJbY3YPy/kD+Rp/vwQ/f8\r
+X-Received: by 10.14.107.3 with SMTP id n3mr5524489eeg.67.1389305936871;\r
+ Thu, 09 Jan 2014 14:18:56 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+ [88.195.111.91])\r
+ by mx.google.com with ESMTPSA id v7sm9383116eel.2.2014.01.09.14.18.55\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Thu, 09 Jan 2014 14:18:56 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/5] test: fix test for literal folder: search\r
+Date: Fri, 10 Jan 2014 00:18:34 +0200\r
+Message-Id:\r
+ <faa934b76728d89da137c209c543e321ddc86a40.1389304779.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.8.5.2\r
+In-Reply-To: <cover.1389304779.git.jani@nikula.org>\r
+References: <cover.1389304779.git.jani@nikula.org>\r
+In-Reply-To: <cover.1389304779.git.jani@nikula.org>\r
+References: <cover.1389304779.git.jani@nikula.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: Fri, 10 Jan 2014 07:23:05 -0000\r
+\r
+---\r
+ test/search-by-folder | 24 +++++++++++++++++++++---\r
+ 1 file changed, 21 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/search-by-folder b/test/search-by-folder\r
+index 5cc2ca8..84ca438 100755\r
+--- a/test/search-by-folder\r
++++ b/test/search-by-folder\r
+@@ -3,6 +3,7 @@ test_description='"notmuch search" by folder: (with variations)'\r
+ . ./test-lib.sh\r
+ \r
+ add_message '[dir]=bad' '[subject]="To the bone"'\r
++add_message '[dir]=.' '[subject]="Top level"'\r
+ add_message '[dir]=bad/news' '[subject]="Bears"'\r
+ mkdir -p "${MAIL_DIR}/duplicate/bad/news"\r
+ cp "$gen_msg_filename" "${MAIL_DIR}/duplicate/bad/news"\r
+@@ -12,29 +13,46 @@ add_message '[dir]=things/favorite' '[subject]="Raindrops, whiskers, kettles"'\r
+ add_message '[dir]=things/bad' '[subject]="Bites, stings, sad feelings"'\r
+ \r
+ test_begin_subtest "Single-world folder: specification (multiple results)"\r
+-output=$(notmuch search folder:bad | notmuch_search_sanitize)\r
++output=$(notmuch search folder:bad folder:bad/news folder:things/bad | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; To the bone (inbox unread)\r
+ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)\r
+ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bites, stings, sad feelings (inbox unread)"\r
+ \r
++test_begin_subtest "Top level folder"\r
++output=$(notmuch search folder:'""' | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Top level (inbox unread)"\r
++\r
+ test_begin_subtest "Two-word path to narrow results to one"\r
+ output=$(notmuch search folder:bad/news | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)"\r
+ \r
++test_begin_subtest "Folder search with --output=files"\r
++output=$(notmuch search --output=files folder:bad/news | sed -e "s,$MAIL_DIR,MAIL_DIR,")\r
++test_expect_equal "$output" "MAIL_DIR/bad/news/msg-003\r
++MAIL_DIR/duplicate/bad/news/msg-003"\r
++\r
+ test_begin_subtest "After removing duplicate instance of matching path"\r
+ rm -r "${MAIL_DIR}/bad/news"\r
+ notmuch new\r
+ output=$(notmuch search folder:bad/news | notmuch_search_sanitize)\r
++test_expect_equal "$output" ""\r
++\r
++test_begin_subtest "Folder search with --output=files part #2"\r
++output=$(notmuch search --output=files folder:duplicate/bad/news | sed -e "s,$MAIL_DIR,MAIL_DIR,")\r
++test_expect_equal "$output" "MAIL_DIR/duplicate/bad/news/msg-003"\r
++\r
++test_begin_subtest "After removing duplicate instance of matching path part #2"\r
++output=$(notmuch search folder:duplicate/bad/news | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)"\r
+ \r
+ test_begin_subtest "After rename, old path returns nothing"\r
+ mv "${MAIL_DIR}/duplicate/bad/news" "${MAIL_DIR}/duplicate/bad/olds"\r
+ notmuch new\r
+-output=$(notmuch search folder:bad/news | notmuch_search_sanitize)\r
++output=$(notmuch search folder:duplicate/bad/news | notmuch_search_sanitize)\r
+ test_expect_equal "$output" ""\r
+ \r
+ test_begin_subtest "After rename, new path returns result"\r
+-output=$(notmuch search folder:bad/olds | notmuch_search_sanitize)\r
++output=$(notmuch search folder:duplicate/bad/olds | notmuch_search_sanitize)\r
+ test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)"\r
+ \r
+ test_done\r
+-- \r
+1.8.5.2\r
+\r