Re: Flat search and threaded views
[notmuch-archives.git] / cc / 4fe08c5908a4d66852edc39e1f2ea84a859eb6
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 723FA431FCF\r
6         for <notmuch@notmuchmail.org>; Sat, 22 Feb 2014 14:26:40 -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
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \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 OFwIRHWs1gv9 for <notmuch@notmuchmail.org>;\r
17         Sat, 22 Feb 2014 14:26:36 -0800 (PST)\r
18 Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com\r
19         [209.85.215.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id A3A6F431FDD\r
22         for <notmuch@notmuchmail.org>; Sat, 22 Feb 2014 14:26:07 -0800 (PST)\r
23 Received: by mail-ea0-f182.google.com with SMTP id r15so2282006ead.41\r
24         for <notmuch@notmuchmail.org>; Sat, 22 Feb 2014 14:26:06 -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=QAhjquWQNK5vE705Da+Gcfx6tgvm4erfnxclK4EtrmY=;\r
30         b=knPTXqyItpZTZTL8L99FTmg34lu/naFaqb2EHqiy//7aK6Lj+r1pehKL2AYIOhWkf6\r
31         q9E8DQFA8FhTxOsb6BRrtccLV4mJO+FG/xhj9wSUWr7uyaOlk6fHI9eXwdz1yWMXef43\r
32         pZYVr+xunJLufuRiUjDotkmxPY7Je8J2s9MgHCZaoAZ/0FbAkIrrvy9AKYkfHrL0V/Wd\r
33         FPes98I6AU+v2Q4/Rc/AySrRpymi4BXCqM0lcJj/OAnZ7GkgyMGSi5LcAhkBv0odhpON\r
34         L8B0pmZV7Q+VFyD3NAOaZDOXKOdvQkDC/G9m9XviPe5liLnaJC+X7f4VxgMDG2pjvYF3\r
35         6cjQ==\r
36 X-Gm-Message-State:\r
37  ALoCoQkKTSyWcWL7YrJ7oEwsuskdLdS9fG9l9bCl//DuEYda7S9+03td6uNrezXGLn10XPUJqcDX\r
38 X-Received: by 10.14.221.201 with SMTP id r49mr16440570eep.104.1393107966391; \r
39         Sat, 22 Feb 2014 14:26:06 -0800 (PST)\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
41         [88.195.111.91])\r
42         by mx.google.com with ESMTPSA id 43sm41995334eeh.13.2014.02.22.14.26.05\r
43         for <multiple recipients>\r
44         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
45         Sat, 22 Feb 2014 14:26:05 -0800 (PST)\r
46 From: Jani Nikula <jani@nikula.org>\r
47 To: notmuch@notmuchmail.org\r
48 Subject: [PATCH v2 08/13] test: add tests for the new boolean folder: and\r
49         path: prefixes\r
50 Date: Sun, 23 Feb 2014 00:25:39 +0200\r
51 Message-Id:\r
52  <2a592e9dfd418ca5e07a81ff8773ab143cbe9454.1393105055.git.jani@nikula.org>\r
53 X-Mailer: git-send-email 1.8.5.3\r
54 In-Reply-To: <cover.1393105055.git.jani@nikula.org>\r
55 References: <cover.1393105055.git.jani@nikula.org>\r
56 In-Reply-To: <cover.1393105055.git.jani@nikula.org>\r
57 References: <cover.1393105055.git.jani@nikula.org>\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Sat, 22 Feb 2014 22:26:40 -0000\r
71 \r
72 Additional tests for the boolean folder: and path: prefixes.\r
73 ---\r
74  test/T101-search-by-folder-and-path.sh | 83 ++++++++++++++++++++++++++++++++++\r
75  1 file changed, 83 insertions(+)\r
76  create mode 100755 test/T101-search-by-folder-and-path.sh\r
77 \r
78 diff --git a/test/T101-search-by-folder-and-path.sh b/test/T101-search-by-folder-and-path.sh\r
79 new file mode 100755\r
80 index 000000000000..9f809e46e110\r
81 --- /dev/null\r
82 +++ b/test/T101-search-by-folder-and-path.sh\r
83 @@ -0,0 +1,83 @@\r
84 +#!/usr/bin/env bash\r
85 +test_description='"notmuch search" by folder: and path:'\r
86 +. ./test-lib.sh\r
87 +\r
88 +add_email_corpus folders\r
89 +\r
90 +test_begin_subtest "folder: search"\r
91 +output=$(notmuch search --output=files folder:foo | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
92 +# bar/baz/05:2, and new/03:2, are duplicates of foo/05:2, and\r
93 +# foo/new/03:2, respectively\r
94 +test_expect_equal "$output" "MAIL_DIR/bar/baz/05:2,\r
95 +MAIL_DIR/foo/05:2,\r
96 +MAIL_DIR/foo/06:2,\r
97 +MAIL_DIR/foo/cur/07:2,\r
98 +MAIL_DIR/foo/cur/08:2,\r
99 +MAIL_DIR/foo/new/03:2,\r
100 +MAIL_DIR/foo/new/09:2,\r
101 +MAIL_DIR/foo/new/10:2,\r
102 +MAIL_DIR/new/03:2,"\r
103 +\r
104 +test_begin_subtest "top level folder: search"\r
105 +output=$(notmuch search --output=files folder:'""' | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
106 +# foo/new/03:2, is a duplicate of new/03:2,\r
107 +test_expect_equal "$output" "MAIL_DIR/01:2,\r
108 +MAIL_DIR/02:2,\r
109 +MAIL_DIR/cur/29:2,\r
110 +MAIL_DIR/cur/30:2,\r
111 +MAIL_DIR/cur/31:2,\r
112 +MAIL_DIR/cur/32:2,\r
113 +MAIL_DIR/cur/33:2,\r
114 +MAIL_DIR/cur/34:2,\r
115 +MAIL_DIR/cur/35:2,\r
116 +MAIL_DIR/cur/36:2,\r
117 +MAIL_DIR/cur/37:2,\r
118 +MAIL_DIR/cur/38:2,\r
119 +MAIL_DIR/cur/39:2,\r
120 +MAIL_DIR/cur/40:2,\r
121 +MAIL_DIR/cur/41:2,\r
122 +MAIL_DIR/cur/42:2,\r
123 +MAIL_DIR/cur/43:2,\r
124 +MAIL_DIR/cur/44:2,\r
125 +MAIL_DIR/cur/45:2,\r
126 +MAIL_DIR/cur/46:2,\r
127 +MAIL_DIR/cur/47:2,\r
128 +MAIL_DIR/cur/48:2,\r
129 +MAIL_DIR/cur/49:2,\r
130 +MAIL_DIR/cur/50:2,\r
131 +MAIL_DIR/cur/52:2,\r
132 +MAIL_DIR/cur/53:2,\r
133 +MAIL_DIR/foo/new/03:2,\r
134 +MAIL_DIR/new/03:2,\r
135 +MAIL_DIR/new/04:2,"\r
136 +\r
137 +test_begin_subtest "path: search"\r
138 +output=$(notmuch search --output=files path:"bar" | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
139 +# foo/05:2, is a duplicate of bar/baz/05:2,\r
140 +test_expect_equal "$output" "MAIL_DIR/bar/17:2,\r
141 +MAIL_DIR/bar/18:2,"\r
142 +\r
143 +test_begin_subtest "top level path: search"\r
144 +output=$(notmuch search --output=files path:'""' | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
145 +test_expect_equal "$output" "MAIL_DIR/01:2,\r
146 +MAIL_DIR/02:2,"\r
147 +\r
148 +test_begin_subtest "recursive path: search"\r
149 +output=$(notmuch search --output=files path:"bar/**" | sed -e "s,$MAIL_DIR,MAIL_DIR," | sort)\r
150 +# foo/05:2, is a duplicate of bar/baz/05:2,\r
151 +test_expect_equal "$output" "MAIL_DIR/bar/17:2,\r
152 +MAIL_DIR/bar/18:2,\r
153 +MAIL_DIR/bar/baz/05:2,\r
154 +MAIL_DIR/bar/baz/23:2,\r
155 +MAIL_DIR/bar/baz/24:2,\r
156 +MAIL_DIR/bar/baz/cur/25:2,\r
157 +MAIL_DIR/bar/baz/cur/26:2,\r
158 +MAIL_DIR/bar/baz/new/27:2,\r
159 +MAIL_DIR/bar/baz/new/28:2,\r
160 +MAIL_DIR/bar/cur/19:2,\r
161 +MAIL_DIR/bar/cur/20:2,\r
162 +MAIL_DIR/bar/new/21:2,\r
163 +MAIL_DIR/bar/new/22:2,\r
164 +MAIL_DIR/foo/05:2,"\r
165 +\r
166 +test_done\r
167 -- \r
168 1.8.5.3\r
169 \r