From: Dmitry Kurochkin Date: Mon, 26 Mar 2012 17:01:50 +0000 (+0400) Subject: Re: [BUG/PATCH 1/2] test: Tests for reply from alternate addresses in emacs X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=7d11eb8d708442681898df8181051c9560f2231a;p=notmuch-archives.git Re: [BUG/PATCH 1/2] test: Tests for reply from alternate addresses in emacs --- diff --git a/fc/93bb899b90873dc66a1e967ed19d8b2440468a b/fc/93bb899b90873dc66a1e967ed19d8b2440468a new file mode 100644 index 000000000..cef08128e --- /dev/null +++ b/fc/93bb899b90873dc66a1e967ed19d8b2440468a @@ -0,0 +1,158 @@ +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 BCC39431FAF + for ; Mon, 26 Mar 2012 10:03:30 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 yfBvzvcaIkR8 for ; + Mon, 26 Mar 2012 10:03:30 -0700 (PDT) +Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com + [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id D5489431FAE + for ; Mon, 26 Mar 2012 10:03:29 -0700 (PDT) +Received: by bkwj4 with SMTP id j4so4830420bkw.26 + for ; Mon, 26 Mar 2012 10:03:28 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:subject:in-reply-to:references:date:message-id:mime-version + :content-type; bh=QILD3Q5FyrNXfv8S6D8pI9Dmv2Y4IBzJxOngo3kFE8I=; + b=bjvMixqPF5MDxuG/lAKZSsJ5K3eJMpPHwoim266JaR4PcUzRoKs+5UXeKdJn7CqTP2 + bOuppQxDDW9kWDKgAWGmZG3vjhzbESasCFS5UuS2+Y+LuIGLsMRy6GByv9e9fml0W5Q9 + X2Y8mmP9V/BxK8caZPCGD4j985acYkCyf2GpSNlUHfFEoxvUff5PRzdKdTZTX/DXKEQh + hgyVptwbUO+Yxl8VthLMuuSNLOOxCs1e9DciR9K4qb5kcK7nm0JWbCDR+9e8SLJaPDz1 + StHfyCeB5+oyFptkuKzWPSjSHIphsCDg7IomrarvwTI/HnVox6BZgVNnu6bTAqzmi+R4 + phCQ== +Received: by 10.205.139.67 with SMTP id iv3mr8979086bkc.8.1332781408286; + Mon, 26 Mar 2012 10:03:28 -0700 (PDT) +Received: from localhost ([91.144.186.21]) + by mx.google.com with ESMTPS id f5sm33751608bke.9.2012.03.26.10.03.26 + (version=TLSv1/SSLv3 cipher=OTHER); + Mon, 26 Mar 2012 10:03:26 -0700 (PDT) +From: Dmitry Kurochkin +To: Adam Wolfe Gordon , notmuch@notmuchmail.org +Subject: Re: [BUG/PATCH 1/2] test: Tests for reply from alternate addresses in + emacs +In-Reply-To: <1332635232-15269-2-git-send-email-awg+notmuch@xvx.ca> +References: <1332635232-15269-1-git-send-email-awg+notmuch@xvx.ca> + <1332635232-15269-2-git-send-email-awg+notmuch@xvx.ca>User-Agent: + Notmuch/0.12+70~g06ecbeb (http://notmuchmail.org) Emacs/23.4.1 + (x86_64-pc-linux-gnu) +Date: Mon, 26 Mar 2012 21:01:50 +0400 +Message-ID: <87bonjjny9.fsf@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +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: Mon, 26 Mar 2012 17:03:30 -0000 + +Adam Wolfe Gordon writes: +> 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"' + +Please remove subject, data and body parameters. add_message would +provide sane default values. + +> + +> +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"' + +Same here. + +Regards, + Dmitry + +> + +> +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 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch