1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
|
#!/usr/bin/env bash
test_description='"notmuch search, count and show" with excludes in several variations'
. $(dirname "$0")/test-lib.sh || exit 1
# Generates a thread consisting of a top level message and 'length'
# replies. The subject of the top message 'subject: top message"
# and the subject of the nth reply in the thread is "subject: reply n"
generate_thread () {
local subject="$1"
local length="$2"
generate_message '[subject]="'"${subject}: top message"'"' '[body]="'"body of top message"'"'
parent_id=$gen_msg_id
gen_thread_msg_id[0]=$gen_msg_id
for i in `seq 1 $length`
do
generate_message '[subject]="'"${subject}: reply $i"'"' \
"[in-reply-to]=\<$parent_id\>" \
'[body]="'"body of reply $i"'"'
gen_thread_msg_id[$i]=$gen_msg_id
parent_id=$gen_msg_id
done
notmuch new > /dev/null
# We cannot retrieve the thread_id until after we have run notmuch new.
gen_thread_id=$(notmuch search --output=threads id:${gen_thread_msg_id[0]} 2>/dev/null)
}
#############################################
# These are the original search exclude tests.
test_begin_subtest "Search, exclude \"deleted\" messages from search"
notmuch config set search.exclude_tags deleted
generate_message '[subject]="Not deleted"'
not_deleted_id=$gen_msg_id
generate_message '[subject]="Deleted"'
notmuch new > /dev/null
notmuch tag +deleted id:$gen_msg_id
deleted_id=$gen_msg_id
output=$(notmuch search subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)"
test_begin_subtest "Search, exclude \"deleted\" messages; alternate config file"
cp ${NOTMUCH_CONFIG} alt-config
notmuch config set search.exclude_tags
notmuch --config=alt-config search subject:deleted | notmuch_search_sanitize > OUTPUT
cp alt-config ${NOTMUCH_CONFIG}
cat <<EOF > EXPECTED
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Search, exclude \"deleted\" messages from message search"
output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "id:$not_deleted_id"
test_begin_subtest "Search, exclude \"deleted\" messages from message search --exclude=false"
output=$(notmuch search --exclude=false --output=messages subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "id:$not_deleted_id
id:$deleted_id"
test_begin_subtest "Search, exclude \"deleted\" messages from message search (non-existent exclude-tag)"
notmuch config set search.exclude_tags deleted non_existent_tag
output=$(notmuch search --output=messages subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "id:$not_deleted_id"
notmuch config set search.exclude_tags deleted
test_begin_subtest "Search, exclude \"deleted\" messages from search, overridden"
output=$(notmuch search subject:deleted and tag:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Deleted (deleted inbox unread)"
test_begin_subtest "Search, exclude \"deleted\" messages from threads"
add_message '[subject]="Not deleted reply"' '[in-reply-to]="<$gen_msg_id>"'
output=$(notmuch search subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)"
test_begin_subtest "Search, don't exclude \"deleted\" messages when --exclude=flag specified"
output=$(notmuch search --exclude=flag subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Deleted (deleted inbox unread)"
test_begin_subtest "Search, don't exclude \"deleted\" messages from search if not configured"
notmuch config set search.exclude_tags
output=$(notmuch search subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
thread:XXX 2001-01-05 [2/2] Notmuch Test Suite; Deleted (deleted inbox unread)"
########################################################
# We construct some threads for the tests. We use the tag "test" to
# indicate which messages we will search for.
# A thread of deleted messages; test matches one of them.
generate_thread "All messages excluded: single match" 5
notmuch tag +deleted $gen_thread_id
notmuch tag +test id:${gen_thread_msg_id[2]}
# A thread of deleted messages; test matches two of them.
generate_thread "All messages excluded: double match" 5
notmuch tag +deleted $gen_thread_id
notmuch tag +test id:${gen_thread_msg_id[2]}
notmuch tag +test id:${gen_thread_msg_id[4]}
# A thread some messages deleted; test only matches a deleted message.
generate_thread "Some messages excluded: single excluded match" 5
notmuch tag +deleted +test id:${gen_thread_msg_id[3]}
# A thread some messages deleted; test only matches a non-deleted message.
generate_thread "Some messages excluded: single non-excluded match" 5
notmuch tag +deleted id:${gen_thread_msg_id[2]}
notmuch tag +test id:${gen_thread_msg_id[4]}
# A thread no messages deleted; test matches a message.
generate_thread "No messages excluded: single match" 5
notmuch tag +test id:${gen_thread_msg_id[3]}
# Temporarily remove excludes to get list of matching messages
notmuch config set search.exclude_tags
matching_message_ids=( `notmuch search --output=messages tag:test` )
notmuch config set search.exclude_tags deleted
#########################################
# Notmuch search tests
test_begin_subtest "Search, default exclusion (thread summary)"
output=$(notmuch search tag:test | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"
test_begin_subtest "Search, default exclusion (messages)"
output=$(notmuch search --output=messages tag:test | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[4]}
${matching_message_ids[5]}"
test_begin_subtest "Search, exclude=true (thread summary)"
output=$(notmuch search --exclude=true tag:test | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"
test_begin_subtest "Search, exclude=true (messages)"
output=$(notmuch search --exclude=true --output=messages tag:test | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[4]}
${matching_message_ids[5]}"
test_begin_subtest "Search, exclude=false (thread summary)"
output=$(notmuch search --exclude=false tag:test | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"
test_begin_subtest "Search, exclude=false (messages)"
output=$(notmuch search --exclude=false --output=messages tag:test | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[0]}
${matching_message_ids[1]}
${matching_message_ids[2]}
${matching_message_ids[3]}
${matching_message_ids[4]}
${matching_message_ids[5]}"
test_begin_subtest "Search, exclude=flag (thread summary)"
output=$(notmuch search --exclude=flag tag:test | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"
test_begin_subtest "Search, exclude=flag (messages)"
output=$(notmuch search --exclude=flag --output=messages tag:test | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[0]}
${matching_message_ids[1]}
${matching_message_ids[2]}
${matching_message_ids[3]}
${matching_message_ids[4]}
${matching_message_ids[5]}"
test_begin_subtest "Search, exclude=all (thread summary)"
output=$(notmuch search --exclude=all tag:test | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/5] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"
test_begin_subtest "Search, exclude=all (messages)"
output=$(notmuch search --exclude=all --output=messages tag:test | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[4]}
${matching_message_ids[5]}"
test_begin_subtest "Search, default exclusion: tag in query (thread summary)"
output=$(notmuch search tag:test and tag:deleted | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"
test_begin_subtest "Search, default exclusion: tag in query (messages)"
output=$(notmuch search --output=messages tag:test and tag:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[0]}
${matching_message_ids[1]}
${matching_message_ids[2]}
${matching_message_ids[3]}"
test_begin_subtest "Search, exclude=true: tag in query (thread summary)"
output=$(notmuch search --exclude=true tag:test and tag:deleted | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"
test_begin_subtest "Search, exclude=true: tag in query (messages)"
output=$(notmuch search --exclude=true --output=messages tag:test and tag:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[0]}
${matching_message_ids[1]}
${matching_message_ids[2]}
${matching_message_ids[3]}"
test_begin_subtest "Search, exclude=false: tag in query (thread summary)"
output=$(notmuch search --exclude=false tag:test and tag:deleted | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"
test_begin_subtest "Search, exclude=false: tag in query (messages)"
output=$(notmuch search --exclude=false --output=messages tag:test and tag:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[0]}
${matching_message_ids[1]}
${matching_message_ids[2]}
${matching_message_ids[3]}"
test_begin_subtest "Search, exclude=flag: tag in query (thread summary)"
output=$(notmuch search --exclude=flag tag:test and tag:deleted | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"
test_begin_subtest "Search, exclude=flag: tag in query (messages)"
output=$(notmuch search --exclude=flag --output=messages tag:test and tag:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[0]}
${matching_message_ids[1]}
${matching_message_ids[2]}
${matching_message_ids[3]}"
test_begin_subtest "Search, exclude=all: tag in query (thread summary)"
output=$(notmuch search --exclude=all tag:test and tag:deleted | notmuch_search_sanitize)
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)
thread:XXX 2001-01-05 [2/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)"
test_begin_subtest "Search, exclude=all: tag in query (messages)"
output=$(notmuch search --exclude=all --output=messages tag:test and tag:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "${matching_message_ids[0]}
${matching_message_ids[1]}
${matching_message_ids[2]}
${matching_message_ids[3]}"
#########################################################
# Notmuch count tests
test_begin_subtest "Count, default exclusion (messages)"
output=$(notmuch count tag:test)
test_expect_equal "$output" "2"
test_begin_subtest "Count, default exclusion (threads)"
output=$(notmuch count --output=threads tag:test)
test_expect_equal "$output" "2"
test_begin_subtest "Count, exclude=true (messages)"
output=$(notmuch count --exclude=true tag:test)
test_expect_equal "$output" "2"
test_begin_subtest "Count, exclude=true (threads)"
output=$(notmuch count --output=threads --exclude=true tag:test)
test_expect_equal "$output" "2"
test_begin_subtest "Count, exclude=false (messages)"
output=$(notmuch count --exclude=false tag:test)
test_expect_equal "$output" "6"
test_begin_subtest "Count, exclude=false (threads)"
output=$(notmuch count --output=threads --exclude=false tag:test)
test_expect_equal "$output" "5"
test_begin_subtest "Count, default exclusion: tag in query (messages)"
output=$(notmuch count tag:test and tag:deleted)
test_expect_equal "$output" "4"
test_begin_subtest "Count, default exclusion: tag in query (threads)"
output=$(notmuch count --output=threads tag:test and tag:deleted)
test_expect_equal "$output" "3"
test_begin_subtest "Count, default exclusion, batch"
notmuch count --batch --output=messages<<EOF > OUTPUT
tag:test
tag:test and tag:deleted
tag:test
tag:test and tag:deleted
EOF
cat <<EOF >EXPECTED
2
4
2
4
EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Count, exclude=true: tag in query (messages)"
output=$(notmuch count --exclude=true tag:test and tag:deleted)
test_expect_equal "$output" "4"
test_begin_subtest "Count, exclude=true: tag in query (threads)"
output=$(notmuch count --output=threads --exclude=true tag:test and tag:deleted)
test_expect_equal "$output" "3"
test_begin_subtest "Count, exclude=false: tag in query (messages)"
output=$(notmuch count --exclude=false tag:test and tag:deleted)
test_expect_equal "$output" "4"
test_begin_subtest "Count, exclude=false: tag in query (threads)"
output=$(notmuch count --output=threads --exclude=false tag:test and tag:deleted)
test_expect_equal "$output" "3"
#############################################################
# Show tests
test_begin_subtest "Show, default exclusion"
output=$(notmuch show tag:test | notmuch_show_sanitize_all | egrep "Subject:|message{")
test_expect_equal "$output" "message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 4
message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 3"
test_begin_subtest "Show, default exclusion (entire-thread)"
output=$(notmuch show --entire-thread tag:test | notmuch_show_sanitize_all | egrep "Subject:|message{")
test_expect_equal "$output" "message{ id:XXXXX depth:0 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: top message
message{ id:XXXXX depth:1 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 1
message{ id:XXXXX depth:2 match:0 excluded:1 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 2
message{ id:XXXXX depth:3 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 3
message{ id:XXXXX depth:4 match:1 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 5
message{ id:XXXXX depth:0 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: top message
message{ id:XXXXX depth:1 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 1
message{ id:XXXXX depth:2 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 2
message{ id:XXXXX depth:3 match:1 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 3
message{ id:XXXXX depth:4 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 5"
test_begin_subtest "Show, exclude=true"
output=$(notmuch show --exclude=true tag:test | notmuch_show_sanitize_all | egrep "Subject:|message{")
test_expect_equal "$output" "message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 4
message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 3"
test_begin_subtest "Show, exclude=true (entire-thread)"
output=$(notmuch show --entire-thread --exclude=true tag:test | notmuch_show_sanitize_all | egrep "Subject:|message{")
test_expect_equal "$output" "message{ id:XXXXX depth:0 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: top message
message{ id:XXXXX depth:1 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 1
message{ id:XXXXX depth:2 match:0 excluded:1 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 2
message{ id:XXXXX depth:3 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 3
message{ id:XXXXX depth:4 match:1 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 5
message{ id:XXXXX depth:0 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: top message
message{ id:XXXXX depth:1 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 1
message{ id:XXXXX depth:2 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 2
message{ id:XXXXX depth:3 match:1 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 3
message{ id:XXXXX depth:4 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 5"
test_begin_subtest "Show, exclude=false"
output=$(notmuch show --exclude=false tag:test | notmuch_show_sanitize_all | egrep "Subject:|message{")
test_expect_equal "$output" "message{ id:XXXXX depth:0 match:1 excluded:1 filename:XXXXX
Subject: All messages excluded: single match: reply 2
message{ id:XXXXX depth:0 match:1 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: reply 2
message{ id:XXXXX depth:1 match:1 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: reply 4
message{ id:XXXXX depth:0 match:1 excluded:1 filename:XXXXX
Subject: Some messages excluded: single excluded match: reply 3
message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 4
message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 3"
test_begin_subtest "Show, exclude=false (entire-thread)"
output=$(notmuch show --entire-thread --exclude=false tag:test | notmuch_show_sanitize_all | egrep "Subject:|message{")
test_expect_equal "$output" "message{ id:XXXXX depth:0 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: single match: top message
message{ id:XXXXX depth:1 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: single match: reply 1
message{ id:XXXXX depth:2 match:1 excluded:1 filename:XXXXX
Subject: All messages excluded: single match: reply 2
message{ id:XXXXX depth:3 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: single match: reply 3
message{ id:XXXXX depth:4 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: single match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: single match: reply 5
message{ id:XXXXX depth:0 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: top message
message{ id:XXXXX depth:1 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: reply 1
message{ id:XXXXX depth:2 match:1 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: reply 2
message{ id:XXXXX depth:3 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: reply 3
message{ id:XXXXX depth:4 match:1 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:1 filename:XXXXX
Subject: All messages excluded: double match: reply 5
message{ id:XXXXX depth:0 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single excluded match: top message
message{ id:XXXXX depth:1 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single excluded match: reply 1
message{ id:XXXXX depth:2 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single excluded match: reply 2
message{ id:XXXXX depth:3 match:1 excluded:1 filename:XXXXX
Subject: Some messages excluded: single excluded match: reply 3
message{ id:XXXXX depth:4 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single excluded match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single excluded match: reply 5
message{ id:XXXXX depth:0 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: top message
message{ id:XXXXX depth:1 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 1
message{ id:XXXXX depth:2 match:0 excluded:1 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 2
message{ id:XXXXX depth:3 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 3
message{ id:XXXXX depth:4 match:1 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:0 filename:XXXXX
Subject: Some messages excluded: single non-excluded match: reply 5
message{ id:XXXXX depth:0 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: top message
message{ id:XXXXX depth:1 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 1
message{ id:XXXXX depth:2 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 2
message{ id:XXXXX depth:3 match:1 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 3
message{ id:XXXXX depth:4 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 4
message{ id:XXXXX depth:5 match:0 excluded:0 filename:XXXXX
Subject: No messages excluded: single match: reply 5"
test_done
|