[BUG/PATCH v2 1/2] test: Tests for reply from alternate addresses in emacs
authorAdam Wolfe Gordon <awg+notmuch@xvx.ca>
Wed, 28 Mar 2012 13:33:54 +0000 (07:33 +1800)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:49 +0000 (09:45 -0800)
96/344c03cc1baff92f57b32f573e062e0355c3ec [new file with mode: 0644]

diff --git a/96/344c03cc1baff92f57b32f573e062e0355c3ec b/96/344c03cc1baff92f57b32f573e062e0355c3ec
new file mode 100644 (file)
index 0000000..06e36ab
--- /dev/null
@@ -0,0 +1,125 @@
+Return-Path: <awg@lagos.xvx.ca>\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 B3FAC431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 28 Mar 2012 06:34:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 WgEL31Qbx+tR for <notmuch@notmuchmail.org>;\r
+       Wed, 28 Mar 2012 06:34:00 -0700 (PDT)\r
+Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10])\r
+       by olra.theworths.org (Postfix) with ESMTP id 968AF431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 28 Mar 2012 06:33:59 -0700 (PDT)\r
+Received: from pd3ml1so-ssvc.prod.shaw.ca ([10.0.141.140])\r
+       by pd4mo1so-svcs.prod.shaw.ca with ESMTP; 28 Mar 2012 07:33:58 -0600\r
+X-Cloudmark-SP-Filtered: true\r
+X-Cloudmark-SP-Result: v=1.1 cv=MPNiKFfsidoaPqBs0kThsodqbsbgvPHp5CGEg9DOvhI=\r
+       c=1 sm=1\r
+       a=K0BHEOyCVIAA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
+       a=7343-z1_AAAA:8 a=A1X0JdhQAAAA:8 a=96eys_Ue-UOLi4JevggA:9\r
+       a=0c-eHkXYtrgA:10 a=Y6qChIQXU1wA:10 a=m3hT4bSK9pFHb6VA:21\r
+       a=9hK9ZkgO4WfUdSWE:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
+Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
+       by pd3ml1so-dmz.prod.shaw.ca with ESMTP; 28 Mar 2012 07:33:58 -0600\r
+Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
+       id CBD748004208; Wed, 28 Mar 2012 07:33:57 -0600 (MDT)\r
+From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
+To: notmuch@notmuchmail.org\r
+Subject: [BUG/PATCH v2 1/2] test: Tests for reply from alternate addresses in\r
+       emacs\r
+Date: Wed, 28 Mar 2012 07:33:54 -0600\r
+Message-Id: <1332941635-21019-2-git-send-email-awg+notmuch@xvx.ca>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <1332941635-21019-1-git-send-email-awg+notmuch@xvx.ca>\r
+References: <1332635232-15269-1-git-send-email-awg+notmuch@xvx.ca>\r
+       <1332941635-21019-1-git-send-email-awg+notmuch@xvx.ca>\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: Wed, 28 Mar 2012 13:34:00 -0000\r
+\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 |   44 ++++++++++++++++++++++++++++++++++++++++++++\r
+ 1 files changed, 44 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 8a28705..3402efb 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -274,6 +274,50 @@ 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
++\r
++test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")\r
++          (notmuch-test-wait)\r
++          (notmuch-search-reply-to-thread)\r
++          (test-output)"\r
++cat <<EOF >EXPECTED\r
++From: Notmuch Test Suite <test_suite_other@notmuchmail.org>\r
++To: Sender <sender@example.com>\r
++Subject: Re: ${test_subtest_name}\r
++In-Reply-To: <${gen_msg_id}>\r
++Fcc: ${MAIL_DIR}/sent\r
++--text follows this line--\r
++Sender <sender@example.com> writes:\r
++\r
++> This is just a test message (#${gen_msg_cnt})\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
++\r
++test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\")\r
++          (notmuch-test-wait)\r
++          (notmuch-search-reply-to-thread)\r
++          (test-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: ${test_subtest_name}\r
++In-Reply-To: <${gen_msg_id}>\r
++Fcc: ${MAIL_DIR}/sent\r
++--text follows this line--\r
++Sender <sender@example.com> writes:\r
++\r
++> This is just a test message (#${gen_msg_cnt})\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