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 E6A4D431FB6
\r
6 for <notmuch@notmuchmail.org>; Wed, 4 May 2011 14:56:06 -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 cdpi+W03WHFi for <notmuch@notmuchmail.org>;
\r
17 Wed, 4 May 2011 14:56:06 -0700 (PDT)
\r
18 Received: from mail-ew0-f53.google.com (mail-ew0-f53.google.com
\r
19 [209.85.215.53]) (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 432A9431FB5
\r
22 for <notmuch@notmuchmail.org>; Wed, 4 May 2011 14:56:06 -0700 (PDT)
\r
23 Received: by ewy8 with SMTP id 8so487360ewy.26
\r
24 for <notmuch@notmuchmail.org>; Wed, 04 May 2011 14:56:05 -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 :in-reply-to:references;
\r
28 bh=tP2Ga6m7QXPNL4j4x3Q+3I4Sd+qOI09eVRX945Of9ck=;
\r
29 b=LRsD3Qiq/TuIyvdJNrOAF1FmmyLIvfY5Qq80F1i7lpiMhYUA4FM4653KldOSOeCscP
\r
30 SZH53FAopJGZKxCBm6HUHlYlHzsgNjL4dDlBaftNWqjAU3CW0+nmu4scs4jNLEw2G0LD
\r
31 64Csaa5MiUwb8TE5Hp5j7OuV61e7amU1u80UI=
\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
33 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
34 b=RmXylmDnvA+oLjuiwcF6zj3oK/M6i+lc7jln7YJNaaNW0vO5nV545Jt3zG6RBgbYS5
\r
35 9hVULa4SSeUe3ixcNBzIIuvdCr+56pQ0xYjdH0J3gjA2fl75nTEhsd0RMXQVJ65n4lCk
\r
36 3dp4pseXQg0gqy3xnChh+Y8yVJzyoxAfmQvlM=
\r
37 Received: by 10.14.22.70 with SMTP id s46mr824470ees.145.1304546164173;
\r
38 Wed, 04 May 2011 14:56:04 -0700 (PDT)
\r
39 Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80])
\r
40 by mx.google.com with ESMTPS id y7sm4303eeh.19.2011.05.04.14.56.03
\r
41 (version=TLSv1/SSLv3 cipher=OTHER);
\r
42 Wed, 04 May 2011 14:56:03 -0700 (PDT)
\r
43 From: Felipe Contreras <felipe.contreras@gmail.com>
\r
44 To: notmuch@notmuchmail.org
\r
45 Subject: [PATCH v3] test/search: add check for slightly tricky search
\r
46 Date: Thu, 5 May 2011 00:55:58 +0300
\r
47 Message-Id: <1304546158-15998-1-git-send-email-felipe.contreras@gmail.com>
\r
48 X-Mailer: git-send-email 1.7.5
\r
49 In-Reply-To: <20110504212636.GP29861@mit.edu>
\r
50 References: <20110504212636.GP29861@mit.edu>
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.13
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Wed, 04 May 2011 21:56:07 -0000
\r
65 It's not really tricky, there are many addresses with a '-' in them. I
\r
66 personally really want to differentiate between foo@bar.com,
\r
67 foo-testing@bar.com, and foo-patches@bar.com.
\r
69 This fails, but it shouldn't:
\r
71 FAIL Search by from (tricky):
\r
72 --- search.17.expected 2011-05-04 21:52:52.913218077 +0000
\r
73 +++ search.17.output 2011-05-04 21:52:52.913218077 +0000
\r
75 +thread:XXX 2000-01-01 [1/1] Search By From Name; search by from (name) (inbox unread)
\r
76 +thread:XXX 2000-01-01 [1/1] search-by-from-trick@foo.com; search by from (tricky trick) (inbox unread)
\r
77 thread:XXX 2000-01-01 [1/1] search-by-from@foo.com; search by from (tricky) (inbox unread)
\r
79 One possibility to make this work is to translate @ to -at- in the
\r
80 database, so search-by-from@foo.com becomes search-by-from-trick-at-foo.com,
\r
81 therefore searching for search-by-from-at- would not be confused.
\r
83 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
\r
85 test/search | 6 ++++++
\r
86 1 files changed, 6 insertions(+), 0 deletions(-)
\r
88 diff --git a/test/search b/test/search
\r
89 index b180c7f..c6223f4 100755
\r
92 @@ -123,4 +123,10 @@ echo -n > expected &&
\r
93 notmuch search "no-message-matches-this" > actual &&
\r
94 test_cmp expected actual'
\r
96 +test_begin_subtest "Search by from (tricky):"
\r
97 +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
98 +add_message '[subject]="search by from (tricky)"' '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' '[from]=search-by-from@foo.com'
\r
99 +output=$(notmuch search from:"search-by-from@" | notmuch_search_sanitize)
\r
100 +test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] search-by-from@foo.com; search by from (tricky) (inbox unread)"
\r