Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 201C5431FD0 for ; Sat, 24 Mar 2012 17:27:23 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RvsWILTlauGp for ; Sat, 24 Mar 2012 17:27:21 -0700 (PDT) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by olra.theworths.org (Postfix) with ESMTP id 90760431FAF for ; Sat, 24 Mar 2012 17:27:21 -0700 (PDT) Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd7ml3no-ssvc.prod.shaw.ca) ([10.0.144.222]) by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 24 Mar 2012 18:27:19 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=aDUJ/pRHNXkohnfhaDKKve0FfU8uPxX8npdo6G126bI= c=1 sm=1 a=iDS7w7XbxqMA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17 a=7343-z1_AAAA:8 a=A1X0JdhQAAAA:8 a=1ozStsCKCd0xQMKWjKkA:9 a=0c-eHkXYtrgA:10 a=Y6qChIQXU1wA:10 a=b78p_PsnVuVXcX8E:21 a=3lUvF6MWi1r_zXaT:21 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56]) by pd7ml3no-dmz.prod.shaw.ca with ESMTP; 24 Mar 2012 18:27:19 -0600 Received: by lagos.xvx.ca (Postfix, from userid 1000) id 0E82E800422C; Sat, 24 Mar 2012 18:27:18 -0600 (MDT) From: Adam Wolfe Gordon To: notmuch@notmuchmail.org Subject: [BUG/PATCH 1/2] test: Tests for reply from alternate addresses in emacs Date: Sat, 24 Mar 2012 18:27:11 -0600 Message-Id: <1332635232-15269-2-git-send-email-awg+notmuch@xvx.ca> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1332635232-15269-1-git-send-email-awg+notmuch@xvx.ca> References: <1332635232-15269-1-git-send-email-awg+notmuch@xvx.ca> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2012 00:27:23 -0000 Since the recent reply changes were pushed, there has been a bug that causes emacs to always reply from the primary address, even if the JSON or default CLI reply output uses an alternate address. This adds two tests to the emacs test library based on the two "Reply form..." tests in the reply test library. One is currently marked broken. --- test/emacs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index 8a28705..fa5d706 100755 --- a/test/emacs +++ b/test/emacs @@ -274,6 +274,58 @@ Notmuch Test Suite writes: EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Reply from alternate address within emacs" +test_subtest_known_broken +add_message '[from]="Sender "' \ + [to]=test_suite_other@notmuchmail.org \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="reply from alternate address"' + +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\") + (notmuch-test-wait) + (notmuch-search-reply-to-thread) + (test-output)" +sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: /' OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: Sender +Subject: Re: notmuch-reply-test +In-Reply-To: +Fcc: ${MAIL_DIR}/sent +--text follows this line-- +Sender writes: + +> reply from alternate address +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "Reply from address in named group list within emacs" +add_message '[from]="Sender "' \ + '[to]=group:test_suite@notmuchmail.org,someone@example.com\;' \ + [cc]=test_suite_other@notmuchmail.org \ + [subject]=notmuch-reply-test \ + '[date]="Tue, 05 Jan 2010 15:43:56 -0000"' \ + '[body]="Reply from address in named group list"' + +test_emacs "(notmuch-search \"id:\\\"${gen_msg_id}\\\"\") + (notmuch-test-wait) + (notmuch-search-reply-to-thread) + (test-output)" +sed -i -e 's/^In-Reply-To: <.*>$/In-Reply-To: /' OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: Sender , someone@example.com +Subject: Re: notmuch-reply-test +In-Reply-To: +Fcc: ${MAIL_DIR}/sent +--text follows this line-- +Sender writes: + +> Reply from address in named group list +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "Reply within emacs to a multipart/mixed message" test_emacs '(notmuch-show "id:20091118002059.067214ed@hikari") (notmuch-show-reply) -- 1.7.5.4