1 Return-Path: <thomas@schwinge.name>
\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 385E8431FB6
\r
6 for <notmuch@notmuchmail.org>; Thu, 27 Jan 2011 02:32:50 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "To"
\r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id SwmwPv-AuLPJ for <notmuch@notmuchmail.org>;
\r
17 Thu, 27 Jan 2011 02:32:48 -0800 (PST)
\r
18 Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de
\r
20 by olra.theworths.org (Postfix) with ESMTP id F0824431FB5
\r
21 for <notmuch@notmuchmail.org>; Thu, 27 Jan 2011 02:32:47 -0800 (PST)
\r
22 Received: from [87.180.65.26] (helo=stokes.schwinge.homeip.net)
\r
23 by smtprelay02.ispgateway.de with esmtpa (Exim 4.68)
\r
24 (envelope-from <thomas@schwinge.name>) id 1PiP9g-0001cK-Qv
\r
25 for notmuch@notmuchmail.org; Thu, 27 Jan 2011 11:32:45 +0100
\r
26 Received: (qmail 3325 invoked from network); 27 Jan 2011 10:32:14 -0000
\r
27 Received: from hsi-kbw-095-208-175-140.hsi5.kabel-badenwuerttemberg.de
\r
29 by stokes.schwinge.homeip.net with QMQP; 27 Jan 2011 10:32:14 -0000
\r
30 Received: (nullmailer pid 20105 invoked by uid 1000);
\r
31 Thu, 27 Jan 2011 10:32:14 -0000
\r
32 From: Thomas Schwinge <thomas@schwinge.name>
\r
33 To: notmuch@notmuchmail.org
\r
34 Subject: [PATCH] Add a few tests for searching LWN emails.
\r
35 Date: Thu, 27 Jan 2011 03:31:49 -0700
\r
36 Message-Id: <1296124309-20072-1-git-send-email-thomas@schwinge.name>
\r
37 X-Mailer: git-send-email 1.7.1
\r
38 To: notmuch@notmuchmail.org
\r
39 X-Df-Sender: thomas@schwinge.name
\r
40 Cc: Thomas Schwinge <thomas@schwinge.name>
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Thu, 27 Jan 2011 10:32:50 -0000
\r
55 These tests should pass -- but they currently don't.
\r
57 Signed-off-by: Thomas Schwinge <thomas@schwinge.name>
\r
63 I reported this on IRC some weeks ago; here is a more elaborate report.
\r
65 What we get from these emails, is an author named ``LWN.net'', and the
\r
66 ``Weekly Notification'' / ``Mailing Lists'' bits are stripped away. I
\r
67 suspect this may be a misinterpretation in the notmuch address parser,
\r
68 related to the dot in the name. I have not yet looked at the relevant
\r
71 The same problem might exist for the To: parser, which I have not yet
\r
78 test/search | 36 ++++++++++++++++++++++++++++++++++++
\r
79 1 files changed, 36 insertions(+), 0 deletions(-)
\r
81 diff --git a/test/search b/test/search
\r
82 index b180c7f..2ae5640 100755
\r
85 @@ -3,6 +3,12 @@ test_description='"notmuch search" in several variations'
\r
90 + '[from]="LWN.net Weekly Notification <lwn@lwn.net>"' \
\r
91 + '[subject]="LWN.net Weekly Edition for January 27, 2011 available"'
\r
93 + '[from]="LWN.net Mailing Lists <lwn@lwn.net>"' \
\r
94 + '[subject]="LWN.net newly freed content for January 27, 2011"'
\r
96 test_begin_subtest "Search body"
\r
97 add_message '[subject]="body search"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [body]=bodysearchtest
\r
98 @@ -57,6 +63,34 @@ add_message '[subject]="search by from (name)"' '[date]="Sat, 01 Jan 2000 12:00:
\r
99 output=$(notmuch search from:"Search By From Name" | notmuch_search_sanitize)
\r
100 test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)"
\r
102 +test_begin_subtest "LWN, I:"
\r
103 +output=$(notmuch search from:'lwn.net weekly notification' | notmuch_search_sanitize)
\r
104 +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)"
\r
106 +test_begin_subtest "LWN, II:"
\r
107 +output=$(notmuch search from:'lwn.net mailing lists' | notmuch_search_sanitize)
\r
108 +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)"
\r
110 +test_begin_subtest "LWN, III:"
\r
111 +output=$(notmuch search from:lwn and from:weekly | notmuch_search_sanitize)
\r
112 +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)"
\r
114 +test_begin_subtest "LWN, IV:"
\r
115 +output=$(notmuch search from:lwn and from:mailing | notmuch_search_sanitize)
\r
116 +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)"
\r
118 +test_begin_subtest "LWN, V:"
\r
119 +output=$(notmuch search from:lwn@lwn.net and subject:weekly | notmuch_search_sanitize)
\r
120 +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)"
\r
122 +test_begin_subtest "LWN, VI:"
\r
123 +output=$(notmuch search from:lwn@lwn.net and subject:mailing | notmuch_search_sanitize)
\r
124 +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)"
\r
126 +test_begin_subtest "LWN, VII:"
\r
127 +output=$(notmuch count from:lwn@lwn.net)
\r
128 +test_expect_equal "$output" 2
\r
130 test_begin_subtest "Search by to: (address)"
\r
131 add_message '[subject]="search by to (address)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' [to]=searchbyto@example.com
\r
132 output=$(notmuch search to:searchbyto@example.com | notmuch_search_sanitize)
\r
133 @@ -97,6 +131,8 @@ thread:XXX 2009-11-18 [1/1] Stewart Smith; [notmuch] [PATCH] Fix linking with
\r
134 thread:XXX 2009-11-18 [2/2] Lars Kellogg-Stedman; [notmuch] \"notmuch help\" outputs to stderr? (attachment inbox unread)
\r
135 thread:XXX 2009-11-17 [1/1] Mikhail Gusarov; [notmuch] [PATCH] Handle rename of message file (inbox unread)
\r
136 thread:XXX 2009-11-17 [2/2] Alex Botero-Lowry, Carl Worth; [notmuch] preliminary FreeBSD support (attachment inbox unread)
\r
137 +thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)
\r
138 +thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)
\r
139 thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; body search (inbox unread)
\r
140 thread:XXX 2000-01-01 [1/1] searchbyfrom; search by from (inbox unread)
\r
141 thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; search by to (inbox unread)
\r
143 tg: (74cb76a..) t/from-lwn (depends on: master)
\r