Re: [PATCH] add has: query prefix to search for specific properties
[notmuch-archives.git] / f2 / 044bfb4697ce0b13ebd328d6f42cf985d200a9
1 Return-Path: <dme@dme.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 E69D2429E26\r
6         for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 01:48:20 -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: -0.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001]\r
13         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 joHQOvwpGnkt for <notmuch@notmuchmail.org>;\r
17         Fri, 24 Oct 2014 01:48:14 -0700 (PDT)\r
18 Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com\r
19  [74.125.82.49])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  43B3B431FD7    for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 01:48:14 -0700\r
22  (PDT)\r
23 Received: by mail-wg0-f49.google.com with SMTP id x12so600212wgg.20\r
24         for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 01:48:12 -0700 (PDT)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:user-agent:from:to:subject:date:message-id\r
28         :in-reply-to:references:mime-version:content-type\r
29         :content-transfer-encoding;\r
30         bh=52F0LC4x2r3whZp2mZvlbnVSXrWE8OmeM/qfuXEZ3LM=;\r
31         b=RykuS65+dlMT6iHJPFdtb0hk7p81Q+N1HsRzCk4OArcXgeunzYCV0XLJYfQTTSxNKK\r
32         SZzogmCiuM11DaxN/zV+Qp9m2s1REbrYQsOhLlfXosAhflITrzCTEpY9Lik1bKU//q4E\r
33         KtmXSCkkGTu5ktocFhWNOue/OFrNdvpY5dOIkpy0NYO2b+e/zv6nH0njxKrwqno6Za62\r
34         Y17MyIsXsDCXS7W3xkfaa/3DpRYoR8XC/Af3bNmhtyTTsOcZzrp2Ph+Gs9JJniSsv5zF\r
35         fovRXFTsflGBc+nyLv6A8byrcIG5cOjrfZRyUjZaPz/Wls3XdRs8FCDUULxVjgUE5PPW\r
36         vnxw==\r
37 X-Gm-Message-State:\r
38  ALoCoQkziUTCXSPHAa60asnBk29pnYAxt3r0Ywxo0IaR94fhJVe3TryHOgi3/YvQeV7ykL6MOJuV\r
39 X-Received: by 10.180.36.134 with SMTP id q6mr2580692wij.56.1414140492889;\r
40         Fri, 24 Oct 2014 01:48:12 -0700 (PDT)\r
41 Received: from disaster-area.hh.sledj.net (disaster-area.hh.sledj.net.\r
42         [81.149.164.25])\r
43         by mx.google.com with ESMTPSA id wt3sm4840424wjb.40.2014.10.24.01.48.12\r
44         for <notmuch@notmuchmail.org>\r
45         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
46         Fri, 24 Oct 2014 01:48:12 -0700 (PDT)\r
47 Received: from localhost (30000@localhost [local]);\r
48         by localhost (OpenSMTPD) with ESMTPA id b87c556d;\r
49         for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 08:48:08 +0000 (UTC)\r
50 User-Agent: OpenSMTPD enqueuer (Demoostik)\r
51 From: David Edmondson <dme@dme.org>\r
52 To: notmuch@notmuchmail.org\r
53 Subject: [PATCH v1 3/3] test: Update tests for :authors_matched and\r
54         :authors_non_matched.\r
55 Date: Fri, 24 Oct 2014 09:48:08 +0100\r
56 Message-Id: <1414140488-29978-4-git-send-email-dme@dme.org>\r
57 X-Mailer: git-send-email 2.1.1\r
58 In-Reply-To: <1414140488-29978-1-git-send-email-dme@dme.org>\r
59 References: <1414140488-29978-1-git-send-email-dme@dme.org>\r
60 MIME-Version: 1.0\r
61 Content-Type: text/plain; charset=UTF-8\r
62 Content-Transfer-Encoding: 8bit\r
63 X-BeenThere: notmuch@notmuchmail.org\r
64 X-Mailman-Version: 2.1.13\r
65 Precedence: list\r
66 List-Id: "Use and development of the notmuch mail system."\r
67         <notmuch.notmuchmail.org>\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
71 List-Post: <mailto:notmuch@notmuchmail.org>\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
75 X-List-Received-Date: Fri, 24 Oct 2014 08:48:21 -0000\r
76 \r
77 ---\r
78  test/T160-json.sh            | 4 ++++\r
79  test/T170-sexp.sh            | 4 ++--\r
80  test/T470-missing-headers.sh | 4 ++++\r
81  3 files changed, 10 insertions(+), 2 deletions(-)\r
82 \r
83 diff --git a/test/T160-json.sh b/test/T160-json.sh\r
84 index c1cf649..d3cf2e7 100755\r
85 --- a/test/T160-json.sh\r
86 +++ b/test/T160-json.sh\r
87 @@ -25,6 +25,8 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",\r
88   \"matched\": 1,\r
89   \"total\": 1,\r
90   \"authors\": \"Notmuch Test Suite\",\r
91 + \"authors_matched\": \"Notmuch Test Suite\",\r
92 + \"authors_non_matched\": \"\",\r
93   \"subject\": \"json-search-subject\",\r
94   \"query\": [\"id:$gen_msg_id\", null],\r
95   \"tags\": [\"inbox\",\r
96 @@ -59,6 +61,8 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",\r
97   \"matched\": 1,\r
98   \"total\": 1,\r
99   \"authors\": \"Notmuch Test Suite\",\r
100 + \"authors_matched\": \"Notmuch Test Suite\",\r
101 + \"authors_non_matched\": \"\",\r
102   \"subject\": \"json-search-utf8-body-sübjéct\",\r
103   \"query\": [\"id:$gen_msg_id\", null],\r
104   \"tags\": [\"inbox\",\r
105 diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh\r
106 index 667e319..8a57b74 100755\r
107 --- a/test/T170-sexp.sh\r
108 +++ b/test/T170-sexp.sh\r
109 @@ -19,7 +19,7 @@ test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :f\r
110  test_begin_subtest "Search message: sexp"\r
111  add_message "[subject]=\"sexp-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"sexp-search-message\""\r
112  output=$(notmuch search --format=sexp "sexp-search-message" | notmuch_search_sanitize)\r
113 -test_expect_equal "$output" "((:thread \"0000000000000002\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :subject \"sexp-search-subject\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
114 +test_expect_equal "$output" "((:thread \"0000000000000002\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :authors_matched \"Notmuch Test Suite\" :authors_non_matched \"\" :subject \"sexp-search-subject\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
115  \r
116  test_begin_subtest "Show message: sexp, utf-8"\r
117  add_message "[subject]=\"sexp-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""\r
118 @@ -44,7 +44,7 @@ test_expect_equal "$output" "((((:id \"$id\" :match t :excluded nil :filename \"\r
119  test_begin_subtest "Search message: sexp, utf-8"\r
120  add_message "[subject]=\"sexp-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""\r
121  output=$(notmuch search --format=sexp "jsön-search-méssage" | notmuch_search_sanitize)\r
122 -test_expect_equal "$output" "((:thread \"0000000000000005\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :subject \"sexp-search-utf8-body-sübjéct\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
123 +test_expect_equal "$output" "((:thread \"0000000000000005\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :authors_matched \"Notmuch Test Suite\" :authors_non_matched \"\" :subject \"sexp-search-utf8-body-sübjéct\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"\r
124  \r
125  \r
126  test_done\r
127 diff --git a/test/T470-missing-headers.sh b/test/T470-missing-headers.sh\r
128 index cb38301..5d66e7e 100755\r
129 --- a/test/T470-missing-headers.sh\r
130 +++ b/test/T470-missing-headers.sh\r
131 @@ -34,6 +34,8 @@ test_expect_equal_json "$output" '\r
132  [\r
133      {\r
134          "authors": "",\r
135 +        "authors_matched": "",\r
136 +        "authors_non_matched": "",\r
137          "date_relative": "2001-01-05",\r
138          "matched": 1,\r
139          "subject": "",\r
140 @@ -48,6 +50,8 @@ test_expect_equal_json "$output" '\r
141      },\r
142      {\r
143          "authors": "Notmuch Test Suite",\r
144 +        "authors_matched": "Notmuch Test Suite",\r
145 +        "authors_non_matched": "",\r
146          "date_relative": "1970-01-01",\r
147          "matched": 1,\r
148          "subject": "",\r
149 -- \r
150 2.1.1\r
151 \r