2 test_description='"notmuch count" for messages and threads'
9 test_begin_subtest "message count is the default for notmuch count"
11 "`notmuch search --output=messages ${SEARCH} | wc -l`" \
12 "`notmuch count ${SEARCH}`"
14 test_begin_subtest "message count with --output=messages"
16 "`notmuch search --output=messages ${SEARCH} | wc -l`" \
17 "`notmuch count --output=messages ${SEARCH}`"
19 test_begin_subtest "thread count with --output=threads"
21 "`notmuch search --output=threads ${SEARCH} | wc -l`" \
22 "`notmuch count --output=threads ${SEARCH}`"
24 test_begin_subtest "thread count is the default for notmuch search"
26 "`notmuch search ${SEARCH} | wc -l`" \
27 "`notmuch count --output=threads ${SEARCH}`"
29 SEARCH="from:cworth and not from:cworth"
30 test_begin_subtest "count with no matching messages"
33 "`notmuch count --output=messages ${SEARCH}`"
35 test_begin_subtest "count with no matching threads"
38 "`notmuch count --output=threads ${SEARCH}`"
40 test_begin_subtest "count excluding \"deleted\" messages"
41 notmuch config set search.exclude_tags deleted
42 generate_message '[subject]="Not deleted"'
43 generate_message '[subject]="Another not deleted"'
44 generate_message '[subject]="Deleted"'
45 notmuch new > /dev/null
46 notmuch tag +deleted id:$gen_msg_id
49 "`notmuch count subject:deleted`"
51 test_begin_subtest "count \"deleted\" messages, exclude overridden"
54 "`notmuch count subject:deleted and tag:deleted`"
56 test_begin_subtest "count \"deleted\" messages, with --no-exclude"
59 "`notmuch count --no-exclude subject:deleted`"