X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT220-reply.sh;h=b6d8f42a933f3fd36e615255e4871c229d4ba1ff;hp=c29a900fa5a4415fa58146376d447e6cea80c2fe;hb=11ac932a4503872c19987b843d58513c4b9ef76f;hpb=23a4d09773ebdb8b3b5d45b6fa5196190228f52d diff --git a/test/T220-reply.sh b/test/T220-reply.sh index c29a900f..b6d8f42a 100755 --- a/test/T220-reply.sh +++ b/test/T220-reply.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description="\"notmuch reply\" in several variations" -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 test_begin_subtest "Basic reply" add_message '[from]="Sender "' \ @@ -133,6 +133,44 @@ On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: > Un-munging Reply-To OK" +test_begin_subtest "Un-munging Reply-To With Exact Match" +add_message '[from]="Sender "' \ + '[to]="Some List "' \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="Un-munging Reply-To"' \ + '[reply-to]="Some List "' + +output=$(notmuch reply id:${gen_msg_id} 2>&1 && echo OK) +test_expect_equal "$output" "From: Notmuch Test Suite +Subject: Re: notmuch-reply-test +To: Sender , Some List +In-Reply-To: <${gen_msg_id}> +References: <${gen_msg_id}> + +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> Un-munging Reply-To +OK" + +test_begin_subtest "Un-munging Reply-To With Raw addr-spec" +add_message '[from]="Sender "' \ + '[to]="Some List "' \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="Un-munging Reply-To"' \ + '[reply-to]="list@example.com"' + +output=$(notmuch reply id:${gen_msg_id} 2>&1 && echo OK) +test_expect_equal "$output" "From: Notmuch Test Suite +Subject: Re: notmuch-reply-test +To: Sender , Some List +In-Reply-To: <${gen_msg_id}> +References: <${gen_msg_id}> + +On Tue, 05 Jan 2010 15:43:56 -0000, Sender wrote: +> Un-munging Reply-To +OK" + test_begin_subtest "Message with header of exactly 200 bytes" add_message '[subject]="This subject is exactly 200 bytes in length. Other than its length there is not much of note here. Note that the length of 200 bytes includes the Subject: and Re: prefixes with two spaces"' \ '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ @@ -142,6 +180,7 @@ test_expect_equal "$output" "From: Notmuch Test Suite References: <${gen_msg_id}> @@ -239,9 +278,10 @@ test_expect_equal_json "$output" ' "id": 1 } ], + "crypto": {}, "date_relative": "2010-01-05", "excluded": false, - "filename": ["'${MAIL_DIR}'/msg-012"], + "filename": ["'${MAIL_DIR}'/msg-014"], "headers": { "Date": "Tue, 05 Jan 2010 15:43:56 +0000", "From": "\u2603 ",