[PATCH 0/2] emacs: wash: word-wrap bugfix and tweak
[notmuch-archives.git] / 36 / 686d0ad872b994767bd1fd9b51404acb0426c3
1 Return-Path: <hohndel@gr8dns.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 08F264196F3\r
6         for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 21:42:31 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id welsZUi-lLmc for <notmuch@notmuchmail.org>;\r
16         Thu, 22 Apr 2010 21:42:30 -0700 (PDT)\r
17 Received: from mail.hohndel.org (mail.hohndel.org [65.23.157.147])\r
18         by olra.theworths.org (Postfix) with ESMTP id EC8AF4196F2\r
19         for <notmuch@notmuchmail.org>; Thu, 22 Apr 2010 21:42:29 -0700 (PDT)\r
20 Received: by mail.hohndel.org (Postfix, from userid 112)\r
21         id 9B35C340FA; Fri, 23 Apr 2010 00:42:29 -0400 (EDT)\r
22 Received: from x200.gr8dns.org (unknown [65.23.157.147])\r
23         by mail.hohndel.org (Postfix) with ESMTP id D3D88340F4;\r
24         Fri, 23 Apr 2010 00:42:28 -0400 (EDT)\r
25 Received: by x200.gr8dns.org (Postfix, from userid 500)\r
26         id 7A875C0458; Thu, 22 Apr 2010 21:42:28 -0700 (PDT)\r
27 From: Dirk Hohndel <hohndel@infradead.org>\r
28 To: <notmuch@notmuchmail.org>\r
29 Subject: [PATCH 1/2] Add tests for author reordering\r
30 Date: Thu, 22 Apr 2010 21:42:14 -0700\r
31 Message-Id: <1271997735-17560-2-git-send-email-hohndel@infradead.org>\r
32 X-Mailer: git-send-email 1.6.6.1\r
33 In-Reply-To: <1271997735-17560-1-git-send-email-hohndel@infradead.org>\r
34 References: <1271997735-17560-1-git-send-email-hohndel@infradead.org>\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Fri, 23 Apr 2010 04:42:31 -0000\r
48 \r
49 Test the different permutation of which authors match the search;\r
50 This exposes a bug in the existing reordering code\r
51 \r
52 Signed-off-by: Dirk Hohndel <hohndel@infradead.org>\r
53 ---\r
54  test/notmuch-test |   27 +++++++++++++++++++++++++++\r
55  1 files changed, 27 insertions(+), 0 deletions(-)\r
56 \r
57 diff --git a/test/notmuch-test b/test/notmuch-test\r
58 index 3c1cd9f..2b76f04 100755\r
59 --- a/test/notmuch-test\r
60 +++ b/test/notmuch-test\r
61 @@ -858,6 +858,33 @@ printf " Searching returns all three messages in one thread..."\r
62  output=$($NOTMUCH search foo | notmuch_search_sanitize)\r
63  pass_if_equal "$output" "thread:XXX   2000-01-01 [3/3] Notmuch Test Suite; brokenthreadtest (inbox unread)"\r
64  \r
65 +printf "\nTesting author reordering;\n"\r
66 +printf " Adding parent message...\t\t\t"\r
67 +generate_message [body]=findme [id]=new-parent-id [subject]=author-reorder-threadtest '[from]="User <user@example.com>"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'\r
68 +output=$(NOTMUCH_NEW)\r
69 +pass_if_equal "$output" "Added 1 new message to the database."\r
70 +printf " Adding initial child message...\t\t"\r
71 +generate_message [body]=findme '[in-reply-to]=\<new-parent-id\>' [subject]=author-reorder-threadtest '[from]="User1 <user1@example.com>"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'\r
72 +output=$(NOTMUCH_NEW)\r
73 +pass_if_equal "$output" "Added 1 new message to the database."\r
74 +printf " Adding second child message...\t\t\t"\r
75 +generate_message [body]=findme '[in-reply-to]=\<new-parent-id\>' [subject]=author-reorder-threadtest '[from]="User2 <user2@example.com>"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"'\r
76 +output=$(NOTMUCH_NEW)\r
77 +pass_if_equal "$output" "Added 1 new message to the database."\r
78 +printf " Searching when all three messages match...\t"\r
79 +output=$($NOTMUCH search findme | notmuch_search_sanitize)\r
80 +pass_if_equal "$output" "thread:XXX   2000-01-01 [3/3] User, User1, User2; author-reorder-threadtest (inbox unread)"\r
81 +printf " Searching when two messages match...\t\t"\r
82 +output=$($NOTMUCH search User1 or User2 | notmuch_search_sanitize)\r
83 +pass_if_equal "$output" "thread:XXX   2000-01-01 [2/3] User1, User2| User; author-reorder-threadtest (inbox unread)"\r
84 +printf " Searching when only one message matches...\t"\r
85 +output=$($NOTMUCH search User2 | notmuch_search_sanitize)\r
86 +pass_if_equal "$output" "thread:XXX   2000-01-01 [1/3] User2| User, User1; author-reorder-threadtest (inbox unread)"\r
87 +printf " Searching when only first message matches...\t"\r
88 +output=$($NOTMUCH search User | notmuch_search_sanitize)\r
89 +pass_if_equal "$output" "thread:XXX   2000-01-01 [1/3] User| User1, User2; author-reorder-threadtest (inbox unread)"\r
90 +\r
91 +\r
92  echo ""\r
93  echo "Notmuch test suite complete."\r
94  \r
95 -- \r
96 1.6.6.1\r
97 \r