[PATCH] test: "search-by-folder" single-word search terms should be updated correctly when directories are renamed.

Pieter Praet pieter at praet.org
Thu May 12 06:22:25 PDT 2011


On Sun, 13 Mar 2011 00:44:14 +0100, Pieter Praet <pieter at praet.org> wrote:
> On Mon, 17 Jan 2011 14:00:41 +0100, Sebastian Spaeth <Sebastian at SSpaeth.de> 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


More information about the notmuch mailing list