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 19771431FD0 for ; Thu, 12 May 2011 06:22:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 i51A-iKaRDDg for ; Thu, 12 May 2011 06:22:30 -0700 (PDT) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 5D558431FB6 for ; Thu, 12 May 2011 06:22:30 -0700 (PDT) Received: by wyi11 with SMTP id 11so1271135wyi.26 for ; Thu, 12 May 2011 06:22:29 -0700 (PDT) Received: by 10.216.231.99 with SMTP id k77mr803816weq.71.1305206549064; Thu, 12 May 2011 06:22:29 -0700 (PDT) Received: from localhost (188.152-240-81.adsl-dyn.isp.belgacom.be [81.240.152.188]) by mx.google.com with ESMTPS id w12sm739937wby.58.2011.05.12.06.22.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 12 May 2011 06:22:28 -0700 (PDT) From: Pieter Praet To: notmuch@notmuchmail.org Subject: Re: [PATCH] test: "search-by-folder" single-word search terms should be updated correctly when directories are renamed. In-Reply-To: <877hc3x5td.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me> References: <87tyh9wzs2.fsf@yoom.home.cworth.org> <878vyjya2n.fsf@SSpaeth.de> <87vd1n4rd2.fsf@SSpaeth.de> <877hc3x5td.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me> User-Agent: Notmuch/0.5-221-ga19d81a (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) Date: Thu, 12 May 2011 15:22:25 +0200 Message-ID: <8739kk9hpq.fsf@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Thu, 12 May 2011 13:22:34 -0000 On Sun, 13 Mar 2011 00:44:14 +0100, Pieter Praet wrote: > On Mon, 17 Jan 2011 14:00:41 +0100, Sebastian Spaeth wrote: > > However, when moving files into another folder and rerunning notmuch > > new, the folder value is never updated, it seems. > > This appears to occur only when searching with a single-word folder > path. > > --- > test/search-by-folder | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/test/search-by-folder b/test/search-by-folder > index 162158c..63ed57b 100755 > --- a/test/search-by-folder > +++ b/test/search-by-folder > @@ -28,13 +28,17 @@ notmuch new > output=$(notmuch search folder:bad/news | notmuch_search_sanitize) > test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)" > > -test_begin_subtest "After rename, old path returns nothing" > +test_begin_subtest "After rename, old multi-word path returns nothing" > mv "${MAIL_DIR}/duplicate/bad/news" "${MAIL_DIR}/duplicate/bad/olds" > increment_mtime "${MAIL_DIR}/duplicate/bad" > notmuch new > output=$(notmuch search folder:bad/news | notmuch_search_sanitize) > test_expect_equal "$output" "" > > +test_begin_subtest "After rename, old single-word path returns nothing" > +output=$(notmuch search folder:news | notmuch_search_sanitize) > +test_expect_equal "$output" "" > + > test_begin_subtest "After rename, new path returns result" > output=$(notmuch search folder:bad/olds | notmuch_search_sanitize) > test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Bears (inbox unread)" > --- I've pushed a cleaner version of this patch to my github repo, for inclusion in release-candidate/0.6. Peace [0] git://github.com/praet/notmuch.git for-review/test-folder-search da50c58545c2fbb77fed -- Pieter