diff options
| author | Kristoffer Balintona <krisbalintona@gmail.com> | 2024-11-04 23:38:07 -0600 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2026-01-25 08:34:08 +0900 |
| commit | d079f76c09e86ed1a3a27c6ca8fd5d8d04985efa (patch) | |
| tree | df5492a2b2bc20d59c8b807f6e34cff8e5ae28ae | |
| parent | ad789ba474581619be9f25838fa3d96d38a8d0c1 (diff) | |
test/emacs: Add tests for `message-cite-reply-position'
`message-cite-reply-position' affects the position of the email body
and signature relative to the email citation in email replies.
Test each of the three possible values of
`message-cite-reply-position'. If `message-cite-reply-position' is
'traditional or 'below, place the email signature below the
citation. If `message-cite-reply-position' is 'above, place the email
signature above the citation (as in Gmail-style email replies).
| -rwxr-xr-x | test/T453-emacs-reply.sh | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/test/T453-emacs-reply.sh b/test/T453-emacs-reply.sh index 0a27d066..f02a2fb9 100755 --- a/test/T453-emacs-reply.sh +++ b/test/T453-emacs-reply.sh @@ -68,4 +68,135 @@ test_emacs "(notmuch-show \"id:${ID3}\") notmuch_dir_sanitize < OUTPUT.raw > OUTPUT test_expect_equal_file_nonempty $EXPECTED/notmuch-reply-duplicate-4 OUTPUT +add_email_corpus default + +ID4=1258471718-6781-2-git-send-email-dottedmag@dottedmag.net +test_begin_subtest "if message-cite-reply-position is 'above, position citation below signature" +test_emacs "(let ((message-cite-reply-position 'above) + (message-signature \"EMAIL SIGNATURE\")) + (notmuch-mua-new-reply \"id:${ID4}\") + (test-visible-output \"OUTPUT.raw\"))" +cat <<EOF > EXPECTED +From: Notmuch Test Suite <test_suite@notmuchmail.org> +To: Mikhail Gusarov <dottedmag@dottedmag.net> +Subject: Re: [notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4 +In-Reply-To: <1258471718-6781-2-git-send-email-dottedmag@dottedmag.net> +Fcc: MAIL_DIR/sent +--text follows this line-- + +-- +EMAIL SIGNATURE + +"Mikhail Gusarov" <dottedmag@dottedmag.net> writes: + +> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net> +> --- +> lib/message.cc | 2 ++ +> 1 files changed, 2 insertions(+), 0 deletions(-) +> +> diff --git a/lib/message.cc b/lib/message.cc +> index 72c350f..a4b090b 100644 +> --- a/lib/message.cc +> +++ b/lib/message.cc +> @@ -21,6 +21,8 @@ +> #include "notmuch-private.h" +> #include "database-private.h" +> +> +#include <stdint.h> +> + +> #include <gmime/gmime.h> +> +> #include <xapian.h> +> -- +> 1.6.3.3 +EOF +notmuch_dir_sanitize < OUTPUT.raw > OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "if message-cite-reply-position is 'traditional, position citation above signature" +test_emacs "(let ((message-cite-reply-position 'traditional) + (message-signature \"EMAIL SIGNATURE\")) + (notmuch-mua-new-reply \"id:${ID4}\") + (test-visible-output \"OUTPUT.raw\"))" +cat <<EOF > EXPECTED +From: Notmuch Test Suite <test_suite@notmuchmail.org> +To: Mikhail Gusarov <dottedmag@dottedmag.net> +Subject: Re: [notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4 +In-Reply-To: <1258471718-6781-2-git-send-email-dottedmag@dottedmag.net> +Fcc: MAIL_DIR/sent +--text follows this line-- +"Mikhail Gusarov" <dottedmag@dottedmag.net> writes: + +> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net> +> --- +> lib/message.cc | 2 ++ +> 1 files changed, 2 insertions(+), 0 deletions(-) +> +> diff --git a/lib/message.cc b/lib/message.cc +> index 72c350f..a4b090b 100644 +> --- a/lib/message.cc +> +++ b/lib/message.cc +> @@ -21,6 +21,8 @@ +> #include "notmuch-private.h" +> #include "database-private.h" +> +> +#include <stdint.h> +> + +> #include <gmime/gmime.h> +> +> #include <xapian.h> +> -- +> 1.6.3.3 +> +> + +-- +EMAIL SIGNATURE +EOF +notmuch_dir_sanitize < OUTPUT.raw > OUTPUT +test_expect_equal_file EXPECTED OUTPUT + +test_begin_subtest "if message-cite-reply-position is 'below, position citation above signature" +test_emacs "(let ((message-cite-reply-position 'below) + (message-signature \"EMAIL SIGNATURE\")) + (notmuch-mua-new-reply \"id:${ID4}\") + (test-visible-output \"OUTPUT.raw\"))" +cat <<EOF > EXPECTED +From: Notmuch Test Suite <test_suite@notmuchmail.org> +To: Mikhail Gusarov <dottedmag@dottedmag.net> +Subject: Re: [notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4 +In-Reply-To: <1258471718-6781-2-git-send-email-dottedmag@dottedmag.net> +Fcc: MAIL_DIR/sent +--text follows this line-- +"Mikhail Gusarov" <dottedmag@dottedmag.net> writes: + +> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net> +> --- +> lib/message.cc | 2 ++ +> 1 files changed, 2 insertions(+), 0 deletions(-) +> +> diff --git a/lib/message.cc b/lib/message.cc +> index 72c350f..a4b090b 100644 +> --- a/lib/message.cc +> +++ b/lib/message.cc +> @@ -21,6 +21,8 @@ +> #include "notmuch-private.h" +> #include "database-private.h" +> +> +#include <stdint.h> +> + +> #include <gmime/gmime.h> +> +> #include <xapian.h> +> -- +> 1.6.3.3 +> +> + +-- +EMAIL SIGNATURE +EOF +notmuch_dir_sanitize < OUTPUT.raw > OUTPUT +test_expect_equal_file EXPECTED OUTPUT + test_done |
