2 test_description='"notmuch count" for messages and threads'
7 # Note: The 'wc -l' results below are wrapped in arithmetic evaluation
8 # $((...)) to strip whitespace. This is for portability, as 'wc -l'
9 # emits whitespace on some BSD variants.
11 test_begin_subtest "message count is the default for notmuch count"
13 "$((`notmuch search --output=messages '*' | wc -l`))" \
16 test_begin_subtest "message count with --output=messages"
18 "$((`notmuch search --output=messages '*' | wc -l`))" \
19 "`notmuch count --output=messages '*'`"
21 test_begin_subtest "thread count with --output=threads"
23 "$((`notmuch search --output=threads '*' | wc -l`))" \
24 "`notmuch count --output=threads '*'`"
26 test_begin_subtest "thread count is the default for notmuch search"
28 "$((`notmuch search '*' | wc -l`))" \
29 "`notmuch count --output=threads '*'`"
31 test_begin_subtest "count with no matching messages"
34 "`notmuch count --output=messages from:cworth and not from:cworth`"
36 test_begin_subtest "count with no matching threads"
39 "`notmuch count --output=threads from:cworth and not from:cworth`"