--- test/reply | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 69 insertions(+), 0 deletions(-) diff --git a/test/reply b/test/reply index 00f4bea..0bb22bb 100755 --- a/test/reply +++ b/test/reply @@ -138,4 +138,73 @@ References: <${gen_msg_id}> On Tue, 05 Jan 2010 15:43:56 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote: > 200-byte header" + +test_begin_subtest "reply --from=none" +add_message '[from]="Sender <sender@example.com>"' \ + [to]=test_suite@notmuchmail.org \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="reply --from=none test"' + +output=$(notmuch reply --from=none id:${gen_msg_id}) +test_expect_equal "$output" "From: +Subject: Re: notmuch-reply-test +To: Sender <sender@example.com> +In-Reply-To: <${gen_msg_id}> +References: <${gen_msg_id}> + +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote: +> reply --from=none test" + +test_begin_subtest "reply --from:fallback-none" +add_message '[from]="Sender <sender@example.com>"' \ + '[to]="Someone Else <someone@example.com>"' \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="reply --from=fallback-none test"' + +output=$(notmuch reply --from=fallback-none id:${gen_msg_id}) +test_expect_equal "$output" "From: +Subject: Re: notmuch-reply-test +To: Sender <sender@example.com>, Someone Else <someone@example.com> +In-Reply-To: <${gen_msg_id}> +References: <${gen_msg_id}> + +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote: +> reply --from=fallback-none test" + +test_begin_subtest "reply default from:" +add_message '[from]="Sender <sender@example.com>"' \ + '[to]="Someone Else <someone@example.com>"' \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="reply default from: test"' + +output=$(notmuch reply id:${gen_msg_id}) +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org> +Subject: Re: notmuch-reply-test +To: Sender <sender@example.com>, Someone Else <someone@example.com> +In-Reply-To: <${gen_msg_id}> +References: <${gen_msg_id}> + +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote: +> reply default from: test" + +test_begin_subtest "Reply --from=primary" +add_message '[from]="Sender <sender@example.com>"' \ + [to]=test_suite_other@notmuchmail.org \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="reply --from=primary"' + +output=$(notmuch reply --from=primary id:${gen_msg_id}) +test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org> +Subject: Re: notmuch-reply-test +To: Sender <sender@example.com> +In-Reply-To: <${gen_msg_id}> +References: <${gen_msg_id}> + +On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender@example.com> wrote: +> reply --from=primary" + test_done -- 1.7.2.3