1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B67DE431FDA
\r
6 for <notmuch@notmuchmail.org>; Thu, 9 Jan 2014 23:23:05 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id KK7a2mkT2qLm for <notmuch@notmuchmail.org>;
\r
17 Thu, 9 Jan 2014 23:22:59 -0800 (PST)
\r
18 Received: from mail-ee0-f50.google.com (mail-ee0-f50.google.com
\r
19 [74.125.83.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
20 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
21 9C529431FDC for <notmuch@notmuchmail.org>; Thu, 9 Jan 2014 23:22:56 -0800
\r
23 Received: by mail-ee0-f50.google.com with SMTP id c41so1703229eek.37
\r
24 for <notmuch@notmuchmail.org>; Thu, 09 Jan 2014 23:22:55 -0800 (PST)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=tFuV44LnXbpaW3axJ9yoYhlWmqMYYtxb0UCw1CgQYXQ=;
\r
30 b=cm4MSbrnxq+BmVR+6FMShdO2YXdCWquKYmomEe32dA8qz/22iwljhH5GLeQRZqoAu8
\r
31 T+O5JkF1mR53+xennK2QV+KiKf8lqVcyfGgbSBgzwKG4pJEtuIt+mqUZmHPAqDyX1xJA
\r
32 ojxrECp34XbLj7VV7L9XYM//oGw0iN5ZG1SwtaxNNndPrVVD/dRIagwahAOxaJdQssOZ
\r
33 zFuFsv0Aj23BZ5nOuvHhXAOBgDkPe0yxM2/yeyPTxWgxHHu8Ye1BkxfHDcdmxCR4UNrn
\r
34 kO6GeM6pfMOr3LaohbP4Vg1+yZHrjucXoaXYTkgxE59JHiXED1LAGp+j9aa58R7nhCx0
\r
37 ALoCoQk5qfz/DC6eG8kTHTlzVyRSDT3+Xpd81j3dgGX1G2xWfTiDm0DhJbY3YPy/kD+Rp/vwQ/f8
\r
38 X-Received: by 10.14.107.3 with SMTP id n3mr5524489eeg.67.1389305936871;
\r
39 Thu, 09 Jan 2014 14:18:56 -0800 (PST)
\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
42 by mx.google.com with ESMTPSA id v7sm9383116eel.2.2014.01.09.14.18.55
\r
43 for <multiple recipients>
\r
44 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
45 Thu, 09 Jan 2014 14:18:56 -0800 (PST)
\r
46 From: Jani Nikula <jani@nikula.org>
\r
47 To: notmuch@notmuchmail.org
\r
48 Subject: [PATCH 3/5] test: fix test for literal folder: search
\r
49 Date: Fri, 10 Jan 2014 00:18:34 +0200
\r
51 <faa934b76728d89da137c209c543e321ddc86a40.1389304779.git.jani@nikula.org>
\r
52 X-Mailer: git-send-email 1.8.5.2
\r
53 In-Reply-To: <cover.1389304779.git.jani@nikula.org>
\r
54 References: <cover.1389304779.git.jani@nikula.org>
\r
55 In-Reply-To: <cover.1389304779.git.jani@nikula.org>
\r
56 References: <cover.1389304779.git.jani@nikula.org>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Fri, 10 Jan 2014 07:23:05 -0000
\r
72 test/search-by-folder | 24 +++++++++++++++++++++---
\r
73 1 file changed, 21 insertions(+), 3 deletions(-)
\r
75 diff --git a/test/search-by-folder b/test/search-by-folder
\r
76 index 5cc2ca8..84ca438 100755
\r
77 --- a/test/search-by-folder
\r
78 +++ b/test/search-by-folder
\r
79 @@ -3,6 +3,7 @@ test_description='"notmuch search" by folder: (with variations)'
\r
82 add_message '[dir]=bad' '[subject]="To the bone"'
\r
83 +add_message '[dir]=.' '[subject]="Top level"'
\r
84 add_message '[dir]=bad/news' '[subject]="Bears"'
\r
85 mkdir -p "${MAIL_DIR}/duplicate/bad/news"
\r
86 cp "$gen_msg_filename" "${MAIL_DIR}/duplicate/bad/news"
\r
87 @@ -12,29 +13,46 @@ add_message '[dir]=things/favorite' '[subject]="Raindrops, whiskers, kettles"'
\r
88 add_message '[dir]=things/bad' '[subject]="Bites, stings, sad feelings"'
\r
90 test_begin_subtest "Single-world folder: specification (multiple results)"
\r
91 -output=$(notmuch search folder:bad | notmuch_search_sanitize)
\r
92 +output=$(notmuch search folder:bad folder:bad/news folder:things/bad | notmuch_search_sanitize)
\r
93 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; To the bone (inbox unread)
\r
94 thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)
\r
95 thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bites, stings, sad feelings (inbox unread)"
\r
97 +test_begin_subtest "Top level folder"
\r
98 +output=$(notmuch search folder:'""' | notmuch_search_sanitize)
\r
99 +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Top level (inbox unread)"
\r
101 test_begin_subtest "Two-word path to narrow results to one"
\r
102 output=$(notmuch search folder:bad/news | notmuch_search_sanitize)
\r
103 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)"
\r
105 +test_begin_subtest "Folder search with --output=files"
\r
106 +output=$(notmuch search --output=files folder:bad/news | sed -e "s,$MAIL_DIR,MAIL_DIR,")
\r
107 +test_expect_equal "$output" "MAIL_DIR/bad/news/msg-003
\r
108 +MAIL_DIR/duplicate/bad/news/msg-003"
\r
110 test_begin_subtest "After removing duplicate instance of matching path"
\r
111 rm -r "${MAIL_DIR}/bad/news"
\r
113 output=$(notmuch search folder:bad/news | notmuch_search_sanitize)
\r
114 +test_expect_equal "$output" ""
\r
116 +test_begin_subtest "Folder search with --output=files part #2"
\r
117 +output=$(notmuch search --output=files folder:duplicate/bad/news | sed -e "s,$MAIL_DIR,MAIL_DIR,")
\r
118 +test_expect_equal "$output" "MAIL_DIR/duplicate/bad/news/msg-003"
\r
120 +test_begin_subtest "After removing duplicate instance of matching path part #2"
\r
121 +output=$(notmuch search folder:duplicate/bad/news | notmuch_search_sanitize)
\r
122 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)"
\r
124 test_begin_subtest "After rename, old path returns nothing"
\r
125 mv "${MAIL_DIR}/duplicate/bad/news" "${MAIL_DIR}/duplicate/bad/olds"
\r
127 -output=$(notmuch search folder:bad/news | notmuch_search_sanitize)
\r
128 +output=$(notmuch search folder:duplicate/bad/news | notmuch_search_sanitize)
\r
129 test_expect_equal "$output" ""
\r
131 test_begin_subtest "After rename, new path returns result"
\r
132 -output=$(notmuch search folder:bad/olds | notmuch_search_sanitize)
\r
133 +output=$(notmuch search folder:duplicate/bad/olds | notmuch_search_sanitize)
\r
134 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)"
\r