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 B6E66431FD0 for ; Sat, 12 Mar 2011 15:44:19 -0800 (PST) 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 EHxIVUkZOGaR for ; Sat, 12 Mar 2011 15:44:19 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 0162C431FB5 for ; Sat, 12 Mar 2011 15:44:18 -0800 (PST) Received: by wwb28 with SMTP id 28so3814426wwb.2 for ; Sat, 12 Mar 2011 15:44:17 -0800 (PST) Received: by 10.227.166.15 with SMTP id k15mr618138wby.204.1299973457534; Sat, 12 Mar 2011 15:44:17 -0800 (PST) Received: from localhost (201.102-240-81.adsl-dyn.isp.belgacom.be [81.240.102.201]) by mx.google.com with ESMTPS id o6sm4738083wbo.21.2011.03.12.15.44.15 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 12 Mar 2011 15:44:16 -0800 (PST) From: Pieter Praet To: notmuch@notmuchmail.org Subject: [PATCH] test: "search-by-folder" single-word search terms should be updated correctly when directories are renamed. In-Reply-To: <87vd1n4rd2.fsf@SSpaeth.de> References: <87tyh9wzs2.fsf@yoom.home.cworth.org> <878vyjya2n.fsf@SSpaeth.de> <87vd1n4rd2.fsf@SSpaeth.de> User-Agent: Notmuch/0.5-49-g4aeb291 (http://notmuchmail.org) Emacs/23.1.50.1 (x86_64-pc-linux-gnu) Date: Sun, 13 Mar 2011 00:44:14 +0100 Message-ID: <877hc3x5td.fsf@A7GMS.i-did-not-set--mail-host-address--so-tickle-me> 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: Sat, 12 Mar 2011 23:44:19 -0000 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)" ---