[PATCH 2/5] test: fix insert folder: searches

Austin Clements amdragon at MIT.EDU
Fri Jan 24 13:20:43 PST 2014


This is the other reason I disagree with including cur/new.  If we strip
it, people's existing folder: searches will mostly continue to work.  If
we include it, such saved searches, scripted searches, and post-new
hooks are guaranteed to break.

On Thu, 09 Jan 2014, Jani Nikula <jani at nikula.org> wrote:
> folder: is now boolean prefix.
> ---
>  test/insert | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/test/insert b/test/insert
> index e8dc4c0..4bbccd5 100755
> --- a/test/insert
> +++ b/test/insert
> @@ -126,14 +126,14 @@ test_expect_equal "$dirname" "$MAIL_DIR/new"
>  test_begin_subtest "Insert message into folder"
>  gen_insert_msg
>  notmuch insert --folder=Drafts < "$gen_msg_filename"
> -output=$(notmuch search --output=files folder:Drafts)
> +output=$(notmuch search --output=files folder:Drafts/new)
>  dirname=$(dirname "$output")
>  test_expect_equal "$dirname" "$MAIL_DIR/Drafts/new"
>  
>  test_begin_subtest "Insert message into folder, add/remove tags"
>  gen_insert_msg
>  notmuch insert --folder=Drafts +draft -unread < "$gen_msg_filename"
> -output=$(notmuch search --output=messages folder:Drafts tag:draft NOT tag:unread)
> +output=$(notmuch search --output=messages folder:Drafts/cur tag:draft NOT tag:unread)
>  test_expect_equal "$output" "id:$gen_msg_id"
>  
>  gen_insert_msg
> @@ -143,21 +143,21 @@ test_expect_code 1 "Insert message into non-existent folder" \
>  test_begin_subtest "Insert message, create folder"
>  gen_insert_msg
>  notmuch insert --folder=F --create-folder +folder < "$gen_msg_filename"
> -output=$(notmuch search --output=files folder:F tag:folder)
> +output=$(notmuch search --output=files folder:F/new tag:folder)
>  basename=$(basename "$output")
>  test_expect_equal_file "$gen_msg_filename" "$MAIL_DIR/F/new/${basename}"
>  
>  test_begin_subtest "Insert message, create subfolder"
>  gen_insert_msg
>  notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"
> -output=$(notmuch search --output=files folder:F/G/H/I/J tag:folder)
> +output=$(notmuch search --output=files folder:F/G/H/I/J/new tag:folder)
>  basename=$(basename "$output")
>  test_expect_equal_file "$gen_msg_filename" "${MAIL_DIR}/F/G/H/I/J/new/${basename}"
>  
>  test_begin_subtest "Insert message, create existing subfolder"
>  gen_insert_msg
>  notmuch insert --folder=F/G/H/I/J --create-folder +folder < "$gen_msg_filename"
> -output=$(notmuch count folder:F/G/H/I/J tag:folder)
> +output=$(notmuch count folder:F/G/H/I/J/new tag:folder)
>  test_expect_equal "$output" "2"
>  
>  gen_insert_msg
> -- 
> 1.8.5.2
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list