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