Re: [BUG/PATCH 1/2] test: Tests for reply from alternate addresses in emacs
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Mon, 26 Mar 2012 17:01:50 +0000 (21:01 +0400)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:45 +0000 (09:45 -0800)
fc/93bb899b90873dc66a1e967ed19d8b2440468a [new file with mode: 0644]

diff --git a/fc/93bb899b90873dc66a1e967ed19d8b2440468a b/fc/93bb899b90873dc66a1e967ed19d8b2440468a
new file mode 100644 (file)
index 0000000..cef0812
--- /dev/null
@@ -0,0 +1,158 @@
+Return-Path: <dmitry.kurochkin@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BCC39431FAF\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 10:03:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id yfBvzvcaIkR8 for <notmuch@notmuchmail.org>;\r
+       Mon, 26 Mar 2012 10:03:30 -0700 (PDT)\r
+Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id D5489431FAE\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 10:03:29 -0700 (PDT)\r
+Received: by bkwj4 with SMTP id j4so4830420bkw.26\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Mar 2012 10:03:28 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:subject:in-reply-to:references:date:message-id:mime-version\r
+       :content-type; bh=QILD3Q5FyrNXfv8S6D8pI9Dmv2Y4IBzJxOngo3kFE8I=;\r
+       b=bjvMixqPF5MDxuG/lAKZSsJ5K3eJMpPHwoim266JaR4PcUzRoKs+5UXeKdJn7CqTP2\r
+       bOuppQxDDW9kWDKgAWGmZG3vjhzbESasCFS5UuS2+Y+LuIGLsMRy6GByv9e9fml0W5Q9\r
+       X2Y8mmP9V/BxK8caZPCGD4j985acYkCyf2GpSNlUHfFEoxvUff5PRzdKdTZTX/DXKEQh\r
+       hgyVptwbUO+Yxl8VthLMuuSNLOOxCs1e9DciR9K4qb5kcK7nm0JWbCDR+9e8SLJaPDz1\r
+       StHfyCeB5+oyFptkuKzWPSjSHIphsCDg7IomrarvwTI/HnVox6BZgVNnu6bTAqzmi+R4\r
+       phCQ==\r
+Received: by 10.205.139.67 with SMTP id iv3mr8979086bkc.8.1332781408286;\r
+       Mon, 26 Mar 2012 10:03:28 -0700 (PDT)\r
+Received: from localhost ([91.144.186.21])\r
+       by mx.google.com with ESMTPS id f5sm33751608bke.9.2012.03.26.10.03.26\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Mon, 26 Mar 2012 10:03:26 -0700 (PDT)\r
+From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>, notmuch@notmuchmail.org\r
+Subject: Re: [BUG/PATCH 1/2] test: Tests for reply from alternate addresses in\r
+       emacs\r
+In-Reply-To: <1332635232-15269-2-git-send-email-awg+notmuch@xvx.ca>\r
+References: <1332635232-15269-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1332635232-15269-2-git-send-email-awg+notmuch@xvx.ca>User-Agent:\r
+       Notmuch/0.12+70~g06ecbeb (http://notmuchmail.org) Emacs/23.4.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Mon, 26 Mar 2012 21:01:50 +0400\r
+Message-ID: <87bonjjny9.fsf@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 26 Mar 2012 17:03:30 -0000\r
+\r
+Adam Wolfe Gordon <awg+notmuch@xvx.ca> writes:\r
+> Since the recent reply changes were pushed, there has been a bug that\r
+> causes emacs to always reply from the primary address, even if the\r
+> JSON or default CLI reply output uses an alternate address.\r
+>\r
+> This adds two tests to the emacs test library based on the two "Reply\r
+> form..." tests in the reply test library. One is currently marked\r
+> broken.\r
+> ---\r
+>  test/emacs |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++\r
+>  1 files changed, 52 insertions(+), 0 deletions(-)\r
+>\r
+> diff --git a/test/emacs b/test/emacs\r
+> index 8a28705..fa5d706 100755\r
+> --- a/test/emacs\r
+> +++ b/test/emacs\r
+> @@ -274,6 +274,58 @@ Notmuch Test Suite <test_suite@notmuchmail.org> writes:\r
+>  EOF\r
+>  test_expect_equal_file OUTPUT EXPECTED\r
+>  \r
+> +test_begin_subtest "Reply from alternate address within emacs"\r
+> +test_subtest_known_broken\r
+> +add_message '[from]="Sender <sender@example.com>"' \\r
+> +         [to]=test_suite_other@notmuchmail.org \\r
+> +         [subject]=notmuch-reply-test \\r
+> +        '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
+> +        '[body]="reply from alternate address"'\r
+\r
+Please remove subject, data and body parameters.  add_message would\r
+provide sane default values.\r
+\r
+> +\r
+> +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")\r
+> +        (notmuch-test-wait)\r
+> +        (notmuch-search-reply-to-thread)\r
+> +        (test-output)"\r
+> +sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' OUTPUT\r
+> +cat <<EOF >EXPECTED\r
+> +From: Notmuch Test Suite <test_suite_other@notmuchmail.org>\r
+> +To: Sender <sender@example.com>\r
+> +Subject: Re: notmuch-reply-test\r
+> +In-Reply-To: <XXX>\r
+> +Fcc: ${MAIL_DIR}/sent\r
+> +--text follows this line--\r
+> +Sender <sender@example.com> writes:\r
+> +\r
+> +> reply from alternate address\r
+> +EOF\r
+> +test_expect_equal_file OUTPUT EXPECTED\r
+> +\r
+> +test_begin_subtest "Reply from address in named group list within emacs"\r
+> +add_message '[from]="Sender <sender@example.com>"' \\r
+> +            '[to]=group:test_suite@notmuchmail.org,someone@example.com\;' \\r
+> +             [cc]=test_suite_other@notmuchmail.org \\r
+> +             [subject]=notmuch-reply-test \\r
+> +            '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \\r
+> +            '[body]="Reply from address in named group list"'\r
+\r
+Same here.\r
+\r
+Regards,\r
+  Dmitry\r
+\r
+> +\r
+> +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")\r
+> +        (notmuch-test-wait)\r
+> +        (notmuch-search-reply-to-thread)\r
+> +        (test-output)"\r
+> +sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: <XXX>/' OUTPUT\r
+> +cat <<EOF >EXPECTED\r
+> +From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+> +To: Sender <sender@example.com>, someone@example.com\r
+> +Subject: Re: notmuch-reply-test\r
+> +In-Reply-To: <XXX>\r
+> +Fcc: ${MAIL_DIR}/sent\r
+> +--text follows this line--\r
+> +Sender <sender@example.com> writes:\r
+> +\r
+> +> Reply from address in named group list\r
+> +EOF\r
+> +test_expect_equal_file OUTPUT EXPECTED\r
+> +\r
+>  test_begin_subtest "Reply within emacs to a multipart/mixed message"\r
+>  test_emacs '(notmuch-show "id:20091118002059.067214ed@hikari")\r
+>              (notmuch-show-reply)\r
+> -- \r
+> 1.7.5.4\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r