[PATCH] devel: add dkg's printmimestructure script to notmuch devel scripts
[notmuch-archives.git] / 8b / 387738b8d724f3f2afbfcd0311e62d55a84026
1 Return-Path: <sojkam1@fel.cvut.cz>\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 59908431FD0\r
6         for <notmuch@notmuchmail.org>; Sat, 22 Jan 2011 08:47:17 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 uXOpi40D9ITb for <notmuch@notmuchmail.org>;\r
16         Sat, 22 Jan 2011 08:47:16 -0800 (PST)\r
17 Received: from mail.loccal.net (gw.loccal.net [94.142.235.206])\r
18         by olra.theworths.org (Postfix) with ESMTP id 67547431FB6\r
19         for <notmuch@notmuchmail.org>; Sat, 22 Jan 2011 08:47:16 -0800 (PST)\r
20 Received: from localhost (localhost [127.0.0.1])\r
21         by mail.loccal.net (Postfix) with ESMTP id 16AA310456;\r
22         Sat, 22 Jan 2011 18:00:15 +0100 (CET)\r
23 X-Virus-Scanned: amavisd-new at loccal.net\r
24 Received: from mail.loccal.net ([127.0.0.1])\r
25         by localhost (mail.loccal.net [127.0.0.1]) (amavisd-new, port 10024)\r
26         with LMTP id nSAHUE8JgdCH; Sat, 22 Jan 2011 18:00:08 +0100 (CET)\r
27 Received: from steelpick.2x.cz (unknown [10.21.129.4])\r
28         by mail.loccal.net (Postfix) with ESMTPS id E41BA10440;\r
29         Sat, 22 Jan 2011 18:00:07 +0100 (CET)\r
30 Received: from wsh by steelpick.2x.cz with local (Exim 4.72)\r
31         (envelope-from <sojkam1@fel.cvut.cz>)\r
32         id 1PggcD-0006bP-Lw; Sat, 22 Jan 2011 17:47:05 +0100\r
33 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
34 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
35 Subject: Re: [PATCH 3.5/8] Query parser tests for wildcard queries.\r
36 In-Reply-To: <20110121064003.GK13226@mit.edu>\r
37 References: <1295165458-9573-1-git-send-email-amdragon@mit.edu>\r
38         <1295165458-9573-4-git-send-email-amdragon@mit.edu>\r
39         <20110121064003.GK13226@mit.edu>\r
40 User-Agent: Notmuch/0.5-49-g76f5678 (http://notmuchmail.org) Emacs/23.2.1\r
41         (x86_64-pc-linux-gnu)\r
42 Date: Sat, 22 Jan 2011 17:47:05 +0100\r
43 Message-ID: <87pqrosx6e.fsf@steelpick.2x.cz>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 Cc: amdragon@mit.edu\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Sat, 22 Jan 2011 16:47:17 -0000\r
60 \r
61 On Fri, 21 Jan 2011, Austin Clements wrote:\r
62 > Since wildcard queries require a database, qparser-test can now open a\r
63 > database.\r
64 \r
65 Hi Austin,\r
66 \r
67 I had to apply the following changes in order to be able to compile the\r
68 tests (make test).\r
69 \r
70 I'm going to test the parser in my daily use, but so far it looks really\r
71 nice. I especially enjoy the before and after searches. Thanks.\r
72 \r
73 -Michal\r
74 \r
75 diff --git a/test/qparser-test.cc b/test/qparser-test.cc\r
76 index 18318aa..5be6220 100644\r
77 --- a/test/qparser-test.cc\r
78 +++ b/test/qparser-test.cc\r
79 @@ -61,7 +61,7 @@ test_one (void *ctx, const char *query_str)\r
80      void *local = talloc_new (ctx);\r
81      Xapian::Query q;\r
82      _notmuch_token_t *toks, *root;\r
83 -    char *error, *qparser_desc, *xqparser_desc;\r
84 +    char *error, *qparser_desc = NULL, *xqparser_desc;\r
85  \r
86      toks = _notmuch_qparser_lex (local, qparser, query_str);\r
87      printf("[lex]    %s\n", _notmuch_token_show_list (local, toks));\r
88 @@ -100,9 +100,9 @@ static _notmuch_qparser_t *\r
89  create_qparser (void *ctx)\r
90  {\r
91      _notmuch_qparser_t *qparser = _notmuch_qparser_create (ctx, notmuch);\r
92 -    _notmuch_qparser_add_db_prefix (qparser, "prob", "P", FALSE);\r
93 -    _notmuch_qparser_add_db_prefix (qparser, "lit", "L", TRUE);\r
94 -    _notmuch_qparser_add_db_prefix (qparser, "tag", "K", TRUE);\r
95 +    _notmuch_qparser_add_db_prefix (qparser, "prob", "P", FALSE, FALSE);\r
96 +    _notmuch_qparser_add_db_prefix (qparser, "lit", "L", TRUE, FALSE);\r
97 +    _notmuch_qparser_add_db_prefix (qparser, "tag", "K", TRUE, FALSE);\r
98      return qparser;\r
99  }\r
100  \r