Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / df / ff2e1e09a3e9578680e6373424cf2b3d08098a
1 Return-Path: <markwalters1009@gmail.com>\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 380A8431FDC\r
6         for <notmuch@notmuchmail.org>; Fri,  6 Apr 2012 05:49:29 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id CxtwZLQbtwGc for <notmuch@notmuchmail.org>;\r
18         Fri,  6 Apr 2012 05:49:24 -0700 (PDT)\r
19 Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com\r
20         [209.85.212.169]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 99746431FD5\r
23         for <notmuch@notmuchmail.org>; Fri,  6 Apr 2012 05:49:22 -0700 (PDT)\r
24 Received: by wibhm17 with SMTP id hm17so581198wib.2\r
25         for <notmuch@notmuchmail.org>; Fri, 06 Apr 2012 05:49:21 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
28         :mime-version:content-type:content-transfer-encoding;\r
29         bh=9XVN1MyBdGxU3EoEkA++7NL8M1tjXj1J2YH+zobYI6U=;\r
30         b=rwOumgodl2ZmwKWlRBjOu5cejPUyuDqzYv3DnVNNJjzUggkJNp0rZ7Sc8EWhRVM896\r
31         UJbug286KLyxrBeYFhOhgJwKdlk02q51cV77P0G5CDsd+Wc9u0+83f82EtJxI6/clHmW\r
32         B5Ju9vFVF2mb2EXIxsHLNVJFTqt1LmJQjgGxDwXC2iF/wNmLBuITiEt3vkJB2rw0P3V1\r
33         SmsN5u4V4ins0ITr+rRPKhyTPC1qPPu4s13Y1mR3qs92pkZhixLiLib8bQXT53rzTXtV\r
34         AKRZr6SH/F3umsoBkiixvPtcS53fydXfToDjJiuaSVyDObMtloiSm2W4db9zeeyTInrM\r
35         53GQ==\r
36 Received: by 10.180.76.240 with SMTP id n16mr10355606wiw.10.1333716561307;\r
37         Fri, 06 Apr 2012 05:49:21 -0700 (PDT)\r
38 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
39  [94.192.233.223])      by mx.google.com with ESMTPS id\r
40  u9sm6176570wix.0.2012.04.06.05.49.19   (version=TLSv1/SSLv3 cipher=OTHER);     Fri,\r
41  06 Apr 2012 05:49:20 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v3 4/6] test: add some exclude tests\r
45 Date: Fri,  6 Apr 2012 13:49:09 +0100\r
46 Message-Id: <1333716551-29153-5-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1333716551-29153-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1333716551-29153-1-git-send-email-markwalters1009@gmail.com>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=UTF-8\r
52 Content-Transfer-Encoding: 8bit\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Fri, 06 Apr 2012 12:49:29 -0000\r
66 \r
67 Systematically test the exclude options for search. Also move the\r
68 search existing exclude tests into the new test. There is some overlap\r
69 between the two sets of tests but many of the existing ones are there\r
70 because they triggered bugs in the past so I have kept them to ensure\r
71 coverage.\r
72 ---\r
73  test/notmuch-test    |    1 +\r
74  test/search          |   48 -----------\r
75  test/search-excludes |  219 ++++++++++++++++++++++++++++++++++++++++++++++++++\r
76  3 files changed, 220 insertions(+), 48 deletions(-)\r
77  create mode 100755 test/search-excludes\r
78 \r
79 diff --git a/test/notmuch-test b/test/notmuch-test\r
80 index f03b594..4dcd8c6 100755\r
81 --- a/test/notmuch-test\r
82 +++ b/test/notmuch-test\r
83 @@ -27,6 +27,7 @@ TESTS="\r
84    search-position-overlap-bug\r
85    search-insufficient-from-quoting\r
86    search-limiting\r
87 +  search-excludes\r
88    tagging\r
89    json\r
90    multipart\r
91 diff --git a/test/search b/test/search\r
92 index 17af6a2..a7a0b18 100755\r
93 --- a/test/search\r
94 +++ b/test/search\r
95 @@ -129,52 +129,4 @@ add_message '[subject]="utf8-message-body-subject"' '[date]="Sat, 01 Jan 2000 12\r
96  output=$(notmuch search "bödý" | notmuch_search_sanitize)\r
97  test_expect_equal "$output" "thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; utf8-message-body-subject (inbox unread)"\r
98  \r
99 -test_begin_subtest "Exclude \"deleted\" messages from search"\r
100 -notmuch config set search.exclude_tags deleted\r
101 -generate_message '[subject]="Not deleted"'\r
102 -not_deleted_id=$gen_msg_id\r
103 -generate_message '[subject]="Deleted"'\r
104 -notmuch new > /dev/null\r
105 -notmuch tag +deleted id:$gen_msg_id\r
106 -deleted_id=$gen_msg_id\r
107 -output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
108 -test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
109 -thread:XXX   2001-01-05 [0/1] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
110 -\r
111 -test_begin_subtest "Exclude \"deleted\" messages from message search"\r
112 -output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize)\r
113 -test_expect_equal "$output" "id:$not_deleted_id"\r
114 -\r
115 -test_begin_subtest "Exclude \"deleted\" messages from message search (no-exclude)"\r
116 -output=$(notmuch search --no-exclude --output=messages subject:deleted | notmuch_search_sanitize)\r
117 -test_expect_equal "$output" "id:$not_deleted_id\r
118 -id:$deleted_id"\r
119 -\r
120 -test_begin_subtest "Exclude \"deleted\" messages from message search (non-existent exclude-tag)"\r
121 -notmuch config set search.exclude_tags deleted non_existent_tag\r
122 -output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize)\r
123 -test_expect_equal "$output" "id:$not_deleted_id"\r
124 -notmuch config set search.exclude_tags deleted\r
125 -\r
126 -test_begin_subtest "Exclude \"deleted\" messages from search, overridden"\r
127 -output=$(notmuch search subject:deleted and tag:deleted | notmuch_search_sanitize)\r
128 -test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
129 -\r
130 -test_begin_subtest "Exclude \"deleted\" messages from threads"\r
131 -add_message '[subject]="Not deleted reply"' '[in-reply-to]="<$gen_msg_id>"'\r
132 -output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
133 -test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
134 -thread:XXX   2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"\r
135 -\r
136 -test_begin_subtest "Don't exclude \"deleted\" messages when --no-exclude specified"\r
137 -output=$(notmuch search --no-exclude subject:deleted | notmuch_search_sanitize)\r
138 -test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
139 -thread:XXX   2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
140 -\r
141 -test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured"\r
142 -notmuch config set search.exclude_tags\r
143 -output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
144 -test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
145 -thread:XXX   2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
146 -\r
147  test_done\r
148 diff --git a/test/search-excludes b/test/search-excludes\r
149 new file mode 100755\r
150 index 0000000..a4cef26\r
151 --- /dev/null\r
152 +++ b/test/search-excludes\r
153 @@ -0,0 +1,219 @@\r
154 +#!/usr/bin/env bash\r
155 +test_description='"notmuch search" with excludes in several variations'\r
156 +. ./test-lib.sh\r
157 +\r
158 +# Generates a thread consisting of a top level message and 'length'\r
159 +# replies. The subject of the top message 'subject: top message"\r
160 +# and the subject of the nth reply in the thread is "subject: reply n"\r
161 +generate_thread ()\r
162 +{\r
163 +    local subject="$1"\r
164 +    local length="$2"\r
165 +    generate_message '[subject]="'"${subject}: top message"'"'\r
166 +    parent_id=$gen_msg_id\r
167 +    gen_thread_msg_id[0]=$gen_msg_id\r
168 +    for i in `seq 1 $length`\r
169 +    do\r
170 +       generate_message '[subject]="'"${subject}: reply $i"'"' \\r
171 +                        "[in-reply-to]=\<$parent_id\>"\r
172 +       gen_thread_msg_id[$i]=$gen_msg_id\r
173 +       parent_id=$gen_msg_id\r
174 +    done\r
175 +    notmuch new > /dev/null\r
176 +    # We cannot retrieve the thread_id until after we have run notmuch new.\r
177 +    gen_thread_id=`notmuch search --output=threads id:${gen_thread_msg_id[0]}`\r
178 +}\r
179 +\r
180 +# These are the original search exclude tests.\r
181 +\r
182 +test_begin_subtest "Exclude \"deleted\" messages from search"\r
183 +notmuch config set search.exclude_tags deleted\r
184 +generate_message '[subject]="Not deleted"'\r
185 +not_deleted_id=$gen_msg_id\r
186 +generate_message '[subject]="Deleted"'\r
187 +notmuch new > /dev/null\r
188 +notmuch tag +deleted id:$gen_msg_id\r
189 +deleted_id=$gen_msg_id\r
190 +output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
191 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)"\r
192 +\r
193 +test_begin_subtest "Exclude \"deleted\" messages from message search"\r
194 +output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize)\r
195 +test_expect_equal "$output" "id:$not_deleted_id"\r
196 +\r
197 +test_begin_subtest "Exclude \"deleted\" messages from message search --exclude=false"\r
198 +output=$(notmuch search --exclude=false --output=messages subject:deleted | notmuch_search_sanitize)\r
199 +test_expect_equal "$output" "id:$not_deleted_id\r
200 +id:$deleted_id"\r
201 +\r
202 +test_begin_subtest "Exclude \"deleted\" messages from message search (non-existent exclude-tag)"\r
203 +notmuch config set search.exclude_tags deleted non_existent_tag\r
204 +output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize)\r
205 +test_expect_equal "$output" "id:$not_deleted_id"\r
206 +notmuch config set search.exclude_tags deleted\r
207 +\r
208 +test_begin_subtest "Exclude \"deleted\" messages from search, overridden"\r
209 +output=$(notmuch search subject:deleted and tag:deleted | notmuch_search_sanitize)\r
210 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
211 +\r
212 +test_begin_subtest "Exclude \"deleted\" messages from threads"\r
213 +add_message '[subject]="Not deleted reply"' '[in-reply-to]="<$gen_msg_id>"'\r
214 +output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
215 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
216 +thread:XXX   2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"\r
217 +\r
218 +test_begin_subtest "Don't exclude \"deleted\" messages when --exclude=flag specified"\r
219 +output=$(notmuch search --exclude=flag subject:deleted | notmuch_search_sanitize)\r
220 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
221 +thread:XXX   2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"\r
222 +\r
223 +test_begin_subtest "Don't exclude \"deleted\" messages from search if not configured"\r
224 +notmuch config set search.exclude_tags\r
225 +output=$(notmuch search subject:deleted | notmuch_search_sanitize)\r
226 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)\r
227 +thread:XXX   2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"\r
228 +\r
229 +\r
230 +\r
231 +\r
232 +# We construct some threads for the tests. We use the tag "test" to\r
233 +# indicate which messages we will search for.\r
234 +\r
235 +# A thread of deleted messages; test matches one of them.\r
236 +generate_thread "All messages excluded: single match" 5\r
237 +notmuch tag +deleted $gen_thread_id\r
238 +notmuch tag +test id:${gen_thread_msg_id[2]}\r
239 +\r
240 +# A thread of deleted messages; test matches two of them.\r
241 +generate_thread "All messages excluded: double match" 5\r
242 +notmuch tag +deleted $gen_thread_id\r
243 +notmuch tag +test id:${gen_thread_msg_id[2]}\r
244 +notmuch tag +test id:${gen_thread_msg_id[4]}\r
245 +\r
246 +# A thread some messages deleted; test only matches a deleted message.\r
247 +generate_thread "Some messages excluded: single excluded match" 5\r
248 +notmuch tag +deleted +test id:${gen_thread_msg_id[3]}\r
249 +\r
250 +# A thread some messages deleted; test only matches a non-deleted message.\r
251 +generate_thread "Some messages excluded: single non-excluded match" 5\r
252 +notmuch tag +deleted id:${gen_thread_msg_id[2]}\r
253 +notmuch tag +test id:${gen_thread_msg_id[4]}\r
254 +\r
255 +# A thread no messages deleted; test matches a message.\r
256 +generate_thread "No messages excluded: single match" 5\r
257 +notmuch tag +test id:${gen_thread_msg_id[3]}\r
258 +\r
259 +# Temporarily remove excludes to get list of matching messages\r
260 +notmuch config set search.exclude_tags\r
261 +matching_message_ids=( `notmuch search --output=messages tag:test` )\r
262 +notmuch config set search.exclude_tags deleted\r
263 +\r
264 +test_begin_subtest "Default exclusion (thread summary)"\r
265 +output=$(notmuch search tag:test | notmuch_search_sanitize)\r
266 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)\r
267 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"\r
268 +\r
269 +test_begin_subtest "Default exclusion (messages)"\r
270 +output=$(notmuch search --output=messages tag:test | notmuch_search_sanitize)\r
271 +test_expect_equal "$output" "${matching_message_ids[4]}\r
272 +${matching_message_ids[5]}"\r
273 +\r
274 +test_begin_subtest "exclude=true (thread summary)"\r
275 +output=$(notmuch search --exclude=true tag:test | notmuch_search_sanitize)\r
276 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)\r
277 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"\r
278 +\r
279 +test_begin_subtest "exclude=true (messages)"\r
280 +output=$(notmuch search --exclude=true --output=messages tag:test | notmuch_search_sanitize)\r
281 +test_expect_equal "$output" "${matching_message_ids[4]}\r
282 +${matching_message_ids[5]}"\r
283 +\r
284 +test_begin_subtest "exclude=false (thread summary)"\r
285 +output=$(notmuch search --exclude=false tag:test | notmuch_search_sanitize)\r
286 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)\r
287 +thread:XXX   2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)\r
288 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)\r
289 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)\r
290 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"\r
291 +\r
292 +test_begin_subtest "exclude=false (messages)"\r
293 +output=$(notmuch search --exclude=false --output=messages tag:test | notmuch_search_sanitize)\r
294 +test_expect_equal "$output" "${matching_message_ids[0]}\r
295 +${matching_message_ids[1]}\r
296 +${matching_message_ids[2]}\r
297 +${matching_message_ids[3]}\r
298 +${matching_message_ids[4]}\r
299 +${matching_message_ids[5]}"\r
300 +\r
301 +test_begin_subtest "exclude=flag (thread summary)"\r
302 +output=$(notmuch search --exclude=flag tag:test | notmuch_search_sanitize)\r
303 +test_expect_equal "$output" "thread:XXX   2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)\r
304 +thread:XXX   2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: double match: reply 4 (deleted inbox test unread)\r
305 +thread:XXX   2001-01-05 [0/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)\r
306 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)\r
307 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"\r
308 +\r
309 +test_begin_subtest "exclude=flag (messages)"\r
310 +output=$(notmuch search --exclude=flag --output=messages tag:test | notmuch_search_sanitize)\r
311 +test_expect_equal "$output" "${matching_message_ids[0]}\r
312 +${matching_message_ids[1]}\r
313 +${matching_message_ids[2]}\r
314 +${matching_message_ids[3]}\r
315 +${matching_message_ids[4]}\r
316 +${matching_message_ids[5]}"\r
317 +\r
318 +test_begin_subtest "Default exclusion: tag in query (thread summary)"\r
319 +output=$(notmuch search tag:test and tag:deleted | notmuch_search_sanitize)\r
320 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)\r
321 +thread:XXX   2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)\r
322 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"\r
323 +\r
324 +test_begin_subtest "Default exclusion: tag in query (messages)"\r
325 +output=$(notmuch search --output=messages tag:test and tag:deleted | notmuch_search_sanitize)\r
326 +test_expect_equal "$output" "${matching_message_ids[0]}\r
327 +${matching_message_ids[1]}\r
328 +${matching_message_ids[2]}\r
329 +${matching_message_ids[3]}"\r
330 +\r
331 +test_begin_subtest "exclude=true: tag in query (thread summary)"\r
332 +output=$(notmuch search --exclude=true tag:test and tag:deleted | notmuch_search_sanitize)\r
333 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)\r
334 +thread:XXX   2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)\r
335 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"\r
336 +\r
337 +test_begin_subtest "exclude=true: tag in query (messages)"\r
338 +output=$(notmuch search --exclude=true --output=messages tag:test and tag:deleted | notmuch_search_sanitize)\r
339 +test_expect_equal "$output" "${matching_message_ids[0]}\r
340 +${matching_message_ids[1]}\r
341 +${matching_message_ids[2]}\r
342 +${matching_message_ids[3]}"\r
343 +\r
344 +test_begin_subtest "exclude=false: tag in query (thread summary)"\r
345 +output=$(notmuch search --exclude=false tag:test and tag:deleted | notmuch_search_sanitize)\r
346 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)\r
347 +thread:XXX   2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)\r
348 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"\r
349 +\r
350 +test_begin_subtest "exclude=false: tag in query (messages)"\r
351 +output=$(notmuch search --exclude=false --output=messages tag:test and tag:deleted | notmuch_search_sanitize)\r
352 +test_expect_equal "$output" "${matching_message_ids[0]}\r
353 +${matching_message_ids[1]}\r
354 +${matching_message_ids[2]}\r
355 +${matching_message_ids[3]}"\r
356 +\r
357 +test_begin_subtest "exclude=flag: tag in query (thread summary)"\r
358 +output=$(notmuch search --exclude=flag tag:test and tag:deleted | notmuch_search_sanitize)\r
359 +test_expect_equal "$output" "thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)\r
360 +thread:XXX   2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)\r
361 +thread:XXX   2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"\r
362 +\r
363 +test_begin_subtest "exclude=flag: tag in query (messages)"\r
364 +output=$(notmuch search --exclude=flag --output=messages tag:test and tag:deleted | notmuch_search_sanitize)\r
365 +test_expect_equal "$output" "${matching_message_ids[0]}\r
366 +${matching_message_ids[1]}\r
367 +${matching_message_ids[2]}\r
368 +${matching_message_ids[3]}"\r
369 +\r
370 +\r
371 +\r
372 +test_done\r
373 -- \r
374 1.7.9.1\r
375 \r