[PATCH v2 4/4] test: test the new --from option to notmuch-reply

Mark Walters markwalters1009 at gmail.com
Sat Feb 4 12:45:17 PST 2012


---
 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 at notmuchmail.org> wrote:
 > 200-byte header"
+
+test_begin_subtest "reply --from=none"
+add_message '[from]="Sender <sender at example.com>"' \
+	     [to]=test_suite at 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 at example.com>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender at example.com> wrote:
+> reply --from=none test"
+
+test_begin_subtest "reply --from:fallback-none"
+add_message '[from]="Sender <sender at example.com>"' \
+	    '[to]="Someone Else <someone at 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 at example.com>, Someone Else <someone at example.com>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender at example.com> wrote:
+> reply --from=fallback-none test"
+
+test_begin_subtest "reply default from:"
+add_message '[from]="Sender <sender at example.com>"' \
+	    '[to]="Someone Else <someone at 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 at notmuchmail.org>
+Subject: Re: notmuch-reply-test
+To: Sender <sender at example.com>, Someone Else <someone at example.com>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender at example.com> wrote:
+> reply default from: test"
+
+test_begin_subtest "Reply --from=primary"
+add_message '[from]="Sender <sender at example.com>"' \
+	     [to]=test_suite_other at 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 at notmuchmail.org>
+Subject: Re: notmuch-reply-test
+To: Sender <sender at example.com>
+In-Reply-To: <${gen_msg_id}>
+References: <${gen_msg_id}>
+
+On Tue, 05 Jan 2010 15:43:56 -0000, Sender <sender at example.com> wrote:
+> reply --from=primary"
+
 test_done
-- 
1.7.2.3



More information about the notmuch mailing list