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

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

Date: Sun, 13 Mar 2011 00:44:14 +0100

To: notmuch@notmuchmail.org

Cc:

From: Pieter Praet


On Mon, 17 Jan 2011 14:00:41 +0100, Sebastian Spaeth <Sebastian@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)"
---

Thread: