1 Return-Path: <felipe.contreras@gmail.com>
\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 37F20431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 4 May 2011 13:26:47 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 JNqf+NlYdVda for <notmuch@notmuchmail.org>;
\r
17 Wed, 4 May 2011 13:26:46 -0700 (PDT)
\r
18 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
19 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 43154431FB5
\r
22 for <notmuch@notmuchmail.org>; Wed, 4 May 2011 13:26:46 -0700 (PDT)
\r
23 Received: by wyi11 with SMTP id 11so1225531wyi.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 04 May 2011 13:26:45 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
26 h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer;
\r
27 bh=kiNNMn66G5odbC7rw/QVqA6cYx8jHFxxC5YlGlLPKNM=;
\r
28 b=EjTvW/FvE7AEV34DcErBsvbKtrJjRwK8hj0TBARw3sZuwnipJ8MIZ+pJSDkULkdzmU
\r
29 +jdeAUTZC6st9UsBRpnGYJ1ZvCzuKQ4LY3ZvQstfDH1MJu5VmkecBjScSmDMjCGkzleG
\r
30 HW/SHO/3bIOpwTwn5cVi9MyjjZ0VwT+yl8Vvc=
\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
32 h=from:to:cc:subject:date:message-id:x-mailer;
\r
33 b=ecQ2gwpax0KkZP3YAs2yC6XafUHzhcOK0iRBMG5RzgA43RRiAM87WUqQXOwcFHsgra
\r
34 jfDiZZbSIBevnS6bUJVdD5WECxpKnseOcDdFLlvwaKPK/0GvtrrAtkI2QSTOIgC7FQqi
\r
35 PeuDRca/1/pwSQJDo83ZldWRvjNVRYyMIFlAU=
\r
36 Received: by 10.227.128.203 with SMTP id l11mr1649922wbs.79.1304540804666;
\r
37 Wed, 04 May 2011 13:26:44 -0700 (PDT)
\r
38 Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80])
\r
39 by mx.google.com with ESMTPS id b6sm633020wby.62.2011.05.04.13.26.43
\r
40 (version=TLSv1/SSLv3 cipher=OTHER);
\r
41 Wed, 04 May 2011 13:26:43 -0700 (PDT)
\r
42 From: Felipe Contreras <felipe.contreras@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH v2] test/search: add check for slightly trick search
\r
45 Date: Wed, 4 May 2011 23:26:36 +0300
\r
46 Message-Id: <1304540796-8865-1-git-send-email-felipe.contreras@gmail.com>
\r
47 X-Mailer: git-send-email 1.7.5
\r
48 X-BeenThere: notmuch@notmuchmail.org
\r
49 X-Mailman-Version: 2.1.13
\r
51 List-Id: "Use and development of the notmuch mail system."
\r
52 <notmuch.notmuchmail.org>
\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
56 List-Post: <mailto:notmuch@notmuchmail.org>
\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
60 X-List-Received-Date: Wed, 04 May 2011 20:26:47 -0000
\r
62 It's not really tricky, there are many addresses with a '-' in them. I
\r
63 personally really want to differentiate between foo@bar.com,
\r
64 foo-testing@bar.com, and foo-patches@bar.com.
\r
66 This fails, but it shouldn't:
\r
68 FAIL Search by from (tricky):
\r
69 --- search.17.expected 2011-05-04 20:23:41.408279424 +0000
\r
70 +++ search.17.output 2011-05-04 20:23:41.408279424 +0000
\r
72 +thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)
\r
73 +thread:XXX 2000-01-01 [1/1] search-by-from-trick@foo.com; search by from (tricky trick) (inbox unread)
\r
74 thread:XXX 2000-01-01 [1/1] search-by-from@foo.com; search by from (tricky) (inbox unread)
\r
76 One possibility to make this work is to translate @ to -at- in the
\r
77 database, so search-by-from@foo.com becomes search-by-from-trick-at-foo.com,
\r
78 therefore searching for search-by-from-at- would not be confused.
\r
80 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
\r
82 test/search | 6 ++++++
\r
83 1 files changed, 6 insertions(+), 0 deletions(-)
\r
85 diff --git a/test/search b/test/search
\r
86 index b180c7f..4c7600e 100755
\r
89 @@ -123,4 +123,10 @@ echo -n > expected &&
\r
90 notmuch search "no-message-matches-this" > actual &&
\r
91 test_cmp expected actual'
\r
93 +test_begin_subtest "Search by from (tricky):"
\r
94 +add_message '[subject]="search by from (tricky trick)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[from]=search-by-from-trick@foo.com'
\r
95 +add_message '[subject]="search by from (tricky)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[from]=search-by-from@foo.com'
\r
96 +output=$(notmuch search from:'search-by-from@' | notmuch_search_sanitize)
\r
97 +test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] search-by-from@foo.com; search by from (tricky) (inbox unread)"
\r