[PATCH v2 05/13] test: fix test for literal folder: search
authorJani Nikula <jani@nikula.org>
Sat, 22 Feb 2014 22:25:36 +0000 (00:25 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:09 +0000 (10:00 -0800)
64/b9bacdb4ec632d618878381ed064dca5b8da0e [new file with mode: 0644]

diff --git a/64/b9bacdb4ec632d618878381ed064dca5b8da0e b/64/b9bacdb4ec632d618878381ed064dca5b8da0e
new file mode 100644 (file)
index 0000000..5541e65
--- /dev/null
@@ -0,0 +1,141 @@
+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 25A49429E37\r
+       for <notmuch@notmuchmail.org>; Sat, 22 Feb 2014 14:26:13 -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 gOs7Bcno7UgA for <notmuch@notmuchmail.org>;\r
+       Sat, 22 Feb 2014 14:26:09 -0800 (PST)\r
+Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com\r
+ [74.125.83.41])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ 6BE6E431FBF   for <notmuch@notmuchmail.org>; Sat, 22 Feb 2014 14:26:00 -0800\r
+ (PST)\r
+Received: by mail-ee0-f41.google.com with SMTP id b15so171101eek.0\r
+       for <notmuch@notmuchmail.org>; Sat, 22 Feb 2014 14:25:59 -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=FfTMgmIXjeUEZG9ebSHcX0rehDDBc/sQNdlb61wsWCc=;\r
+       b=RsG0xDZa+RGAeq+iAX3ClbmoR0grL2G7CnAZvojvvG3g+Pz+LULuCSoTKaWrLWj3bB\r
+       ZpNM343Sek/UxZ8s+nlFLwiPE4z4R3WAuLFqFyxOcMBH2447uRsgJ1LmpqGv5TI4ghB8\r
+       RY8CMj+0bilXF5y0EJZpG2ttMs55HfU3WPRm3oKTHwHfLzzU/ZES21gFTmUV9fhjLkKT\r
+       Gt4MhF7UnZv4NVUJ7me0ShtD7Qa1KIvqiszPUocFKcV6Rw0SQtdGLLLvp7iE4/Ntax5J\r
+       fdMvW7caRVb/4q/iOorudmaTdaFp57NRqpxYmWyMhDK30DKGEzf3a+UpUgXCURPfI+mU\r
+       5CQw==\r
+X-Gm-Message-State:\r
+ ALoCoQkJIvuj9doVfgeX6tD5DYYjMI3kveS6Ie7B/S9jFOjH+sT30XyFLedXb5nGn+1TqZCBLape\r
+X-Received: by 10.14.176.66 with SMTP id a42mr16115353eem.101.1393107959165;\r
+       Sat, 22 Feb 2014 14:25:59 -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 g1sm43759857eet.6.2014.02.22.14.25.57\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Sat, 22 Feb 2014 14:25:58 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 05/13] test: fix test for literal folder: search\r
+Date: Sun, 23 Feb 2014 00:25:36 +0200\r
+Message-Id:\r
+ <7f0d707ba67d9de5940e05c110e9a78f669e9b06.1393105055.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.8.5.3\r
+In-Reply-To: <cover.1393105055.git.jani@nikula.org>\r
+References: <cover.1393105055.git.jani@nikula.org>\r
+In-Reply-To: <cover.1393105055.git.jani@nikula.org>\r
+References: <cover.1393105055.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: Sat, 22 Feb 2014 22:26:13 -0000\r
+\r
+Some of the folder: matching capabilities are lost in the\r
+probabilistic to boolean prefix change. Fix them.\r
+---\r
+ test/T100-search-by-folder.sh | 24 +++++++++++++++++++++---\r
+ 1 file changed, 21 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/test/T100-search-by-folder.sh b/test/T100-search-by-folder.sh\r
+index 5cc2ca8d388a..84ca43820031 100755\r
+--- a/test/T100-search-by-folder.sh\r
++++ b/test/T100-search-by-folder.sh\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.3\r
+\r