2 test_description='searching for messages from lwn.net'
6 '[from]="LWN.net Weekly Notification <lwn@lwn.net>"' \
7 '[subject]="LWN.net Weekly Edition for January 27, 2011 available"'
9 '[from]="LWN.net Mailing Lists <lwn@lwn.net>"' \
10 '[subject]="LWN.net newly freed content for January 27, 2011"'
12 test_begin_subtest "LWN, I:"
13 output=$(notmuch search from:'lwn.net weekly notification' | notmuch_search_sanitize)
14 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)"
16 test_begin_subtest "LWN, II:"
17 output=$(notmuch search from:'lwn.net mailing lists' | notmuch_search_sanitize)
18 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"
20 test_begin_subtest "LWN, III:"
21 output=$(notmuch search from:lwn and from:weekly | notmuch_search_sanitize)
22 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)"
24 test_begin_subtest "LWN, IV:"
25 output=$(notmuch search from:lwn and from:mailing | notmuch_search_sanitize)
26 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"
28 test_begin_subtest "LWN, V:"
29 output=$(notmuch search from:lwn@lwn.net and subject:weekly | notmuch_search_sanitize)
30 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)"
32 test_begin_subtest "LWN, VI:"
33 output=$(notmuch search from:lwn@lwn.net and subject:mailing | notmuch_search_sanitize)
34 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"
36 test_begin_subtest "LWN, VII:"
37 output=$(notmuch count from:lwn@lwn.net)
38 test_expect_equal "$output" 2
40 test_begin_subtest 'Search for all messages ("*")'
41 output=$(notmuch search '*' | notmuch_search_sanitize)
42 test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)
43 thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"