Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 59908431FD0 for ; Sat, 22 Jan 2011 08:47:17 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uXOpi40D9ITb for ; Sat, 22 Jan 2011 08:47:16 -0800 (PST) Received: from mail.loccal.net (gw.loccal.net [94.142.235.206]) by olra.theworths.org (Postfix) with ESMTP id 67547431FB6 for ; Sat, 22 Jan 2011 08:47:16 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.loccal.net (Postfix) with ESMTP id 16AA310456; Sat, 22 Jan 2011 18:00:15 +0100 (CET) X-Virus-Scanned: amavisd-new at loccal.net Received: from mail.loccal.net ([127.0.0.1]) by localhost (mail.loccal.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nSAHUE8JgdCH; Sat, 22 Jan 2011 18:00:08 +0100 (CET) Received: from steelpick.2x.cz (unknown [10.21.129.4]) by mail.loccal.net (Postfix) with ESMTPS id E41BA10440; Sat, 22 Jan 2011 18:00:07 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.72) (envelope-from ) id 1PggcD-0006bP-Lw; Sat, 22 Jan 2011 17:47:05 +0100 From: Michal Sojka To: Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH 3.5/8] Query parser tests for wildcard queries. In-Reply-To: <20110121064003.GK13226@mit.edu> References: <1295165458-9573-1-git-send-email-amdragon@mit.edu> <1295165458-9573-4-git-send-email-amdragon@mit.edu> <20110121064003.GK13226@mit.edu> User-Agent: Notmuch/0.5-49-g76f5678 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Sat, 22 Jan 2011 17:47:05 +0100 Message-ID: <87pqrosx6e.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: amdragon@mit.edu X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2011 16:47:17 -0000 On Fri, 21 Jan 2011, Austin Clements wrote: > Since wildcard queries require a database, qparser-test can now open a > database. Hi Austin, I had to apply the following changes in order to be able to compile the tests (make test). I'm going to test the parser in my daily use, but so far it looks really nice. I especially enjoy the before and after searches. Thanks. -Michal diff --git a/test/qparser-test.cc b/test/qparser-test.cc index 18318aa..5be6220 100644 --- a/test/qparser-test.cc +++ b/test/qparser-test.cc @@ -61,7 +61,7 @@ test_one (void *ctx, const char *query_str) void *local = talloc_new (ctx); Xapian::Query q; _notmuch_token_t *toks, *root; - char *error, *qparser_desc, *xqparser_desc; + char *error, *qparser_desc = NULL, *xqparser_desc; toks = _notmuch_qparser_lex (local, qparser, query_str); printf("[lex] %s\n", _notmuch_token_show_list (local, toks)); @@ -100,9 +100,9 @@ static _notmuch_qparser_t * create_qparser (void *ctx) { _notmuch_qparser_t *qparser = _notmuch_qparser_create (ctx, notmuch); - _notmuch_qparser_add_db_prefix (qparser, "prob", "P", FALSE); - _notmuch_qparser_add_db_prefix (qparser, "lit", "L", TRUE); - _notmuch_qparser_add_db_prefix (qparser, "tag", "K", TRUE); + _notmuch_qparser_add_db_prefix (qparser, "prob", "P", FALSE, FALSE); + _notmuch_qparser_add_db_prefix (qparser, "lit", "L", TRUE, FALSE); + _notmuch_qparser_add_db_prefix (qparser, "tag", "K", TRUE, FALSE); return qparser; }