X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2Fnotmuch-test;h=e1ff55d16bd0dfd4fc7ed41b8eeaa0bcbfe5884f;hb=a35a9a77af1b5e5afa6d78fcc461a60acafb31b6;hp=72763725257713d5e7bbed3181cc22d3ad8c3b2e;hpb=037cfc5f5a79e541ecd3789e0ec815c9d88c0223;p=notmuch diff --git a/test/notmuch-test b/test/notmuch-test index 72763725..e1ff55d1 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -1,6 +1,10 @@ #!/bin/bash set -e +# Messages contain time/date values with time zone and notmuch +# displays them converted to the local time zone. We need to set fixed +# timezone here so that the output of the tests is always the same +# without regard to the time zone of where the test suite is run. export TZ=UTC+8 find_notmuch_binary () @@ -867,6 +871,33 @@ printf " Searching returns all three messages in one thread..." output=$($NOTMUCH search foo | notmuch_search_sanitize) pass_if_equal "$output" "thread:XXX 2000-01-01 [3/3] Notmuch Test Suite; brokenthreadtest (inbox unread)" +printf "\nTesting author reordering;\n" +printf " Adding parent message...\t\t\t" +generate_message [body]=findme [id]=new-parent-id [subject]=author-reorder-threadtest '[from]="User "' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' +output=$(NOTMUCH_NEW) +pass_if_equal "$output" "Added 1 new message to the database." +printf " Adding initial child message...\t\t" +generate_message [body]=findme '[in-reply-to]=\' [subject]=author-reorder-threadtest '[from]="User1 "' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' +output=$(NOTMUCH_NEW) +pass_if_equal "$output" "Added 1 new message to the database." +printf " Adding second child message...\t\t\t" +generate_message [body]=findme '[in-reply-to]=\' [subject]=author-reorder-threadtest '[from]="User2 "' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' +output=$(NOTMUCH_NEW) +pass_if_equal "$output" "Added 1 new message to the database." +printf " Searching when all three messages match...\t" +output=$($NOTMUCH search findme | notmuch_search_sanitize) +pass_if_equal "$output" "thread:XXX 2000-01-01 [3/3] User, User1, User2; author-reorder-threadtest (inbox unread)" +printf " Searching when two messages match...\t\t" +output=$($NOTMUCH search User1 or User2 | notmuch_search_sanitize) +pass_if_equal "$output" "thread:XXX 2000-01-01 [2/3] User1, User2| User; author-reorder-threadtest (inbox unread)" +printf " Searching when only one message matches...\t" +output=$($NOTMUCH search User2 | notmuch_search_sanitize) +pass_if_equal "$output" "thread:XXX 2000-01-01 [1/3] User2| User, User1; author-reorder-threadtest (inbox unread)" +printf " Searching when only first message matches...\t" +output=$($NOTMUCH search User | notmuch_search_sanitize) +pass_if_equal "$output" "thread:XXX 2000-01-01 [1/3] User| User1, User2; author-reorder-threadtest (inbox unread)" + +printf "\nTesting From line heuristics;\n" printf " Magic from guessing (nothing to go on)...\t" add_message '[from]="Sender "' \ [to]=mailinglist@notmuchmail.org \ @@ -878,6 +909,7 @@ output=$($NOTMUCH reply id:${gen_msg_id}) pass_if_equal "$output" "From: Notmuch Test Suite Subject: Re: notmuch-reply-test To: Sender , mailinglist@notmuchmail.org +Bcc: test_suite@notmuchmail.org In-Reply-To: <${gen_msg_id}> References: <${gen_msg_id}> @@ -896,6 +928,7 @@ output=$($NOTMUCH reply id:${gen_msg_id}) pass_if_equal "$output" "From: Notmuch Test Suite Subject: Re: notmuch-reply-test To: Sender , mailinglist@notmuchmail.org +Bcc: test_suite@notmuchmail.org In-Reply-To: <${gen_msg_id}> References: <${gen_msg_id}> @@ -914,6 +947,7 @@ output=$($NOTMUCH reply id:${gen_msg_id}) pass_if_equal "$output" "From: Notmuch Test Suite Subject: Re: notmuch-reply-test To: Sender , mailinglist@notmuchmail.org +Bcc: test_suite@notmuchmail.org In-Reply-To: <${gen_msg_id}> References: <${gen_msg_id}> @@ -934,6 +968,7 @@ output=$($NOTMUCH reply id:${gen_msg_id}) pass_if_equal "$output" "From: Notmuch Test Suite Subject: Re: notmuch-reply-test To: Sender , mailinglist@notmuchmail.org +Bcc: test_suite@notmuchmail.org In-Reply-To: <${gen_msg_id}> References: <${gen_msg_id}> @@ -954,13 +989,13 @@ output=$($NOTMUCH reply id:${gen_msg_id}) pass_if_equal "$output" "From: Notmuch Test Suite Subject: Re: notmuch-reply-test To: Sender , mailinglist@notmuchmail.org +Bcc: test_suite@notmuchmail.org In-Reply-To: <${gen_msg_id}> References: <${gen_msg_id}> On Tue, 05 Jan 2010 15:43:56 -0800, Sender wrote: > from guessing test" - echo "" echo "Notmuch test suite complete."