From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BE089431FAF for ; Mon, 20 Feb 2012 04:46:00 -0800 (PST) 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 O5nZU+U7Qerw for ; Mon, 20 Feb 2012 04:45:56 -0800 (PST) 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 86952431FAE for ; Mon, 20 Feb 2012 04:45:56 -0800 (PST) Received: by bkcit16 with SMTP id it16so5139342bkc.26 for ; Mon, 20 Feb 2012 04:45:55 -0800 (PST) Received-SPF: pass (google.com: domain of dmitry.kurochkin@gmail.com designates 10.204.143.145 as permitted sender) client-ip=10.204.143.145; Authentication-Results: mr.google.com; spf=pass (google.com: domain of dmitry.kurochkin@gmail.com designates 10.204.143.145 as permitted sender) smtp.mail=dmitry.kurochkin@gmail.com; dkim=pass header.i=dmitry.kurochkin@gmail.com Received: from mr.google.com ([10.204.143.145]) by 10.204.143.145 with SMTP id v17mr11267767bku.20.1329741955168 (num_hops = 1); Mon, 20 Feb 2012 04:45:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-type; bh=zcONjoXh7+YzMapg1a0gbteCyQbur024a0eAAfCNiyc=; b=arcyeCF6EaSzP0T63F3JwKmAD4So/8W68EL4IBqarQ9eaWV+DcN0wzkRm0B5sSLvGY o0pgEMlw8AgkrDJMtt1L8nWoSEaom9JIshkgyGyHeENI/vHA5J83LrVtojLLKpTMOHwF LYr6orW0oaUjo+6ER3GcNDPQCaXqAwyg92R+Y= Received: by 10.204.143.145 with SMTP id v17mr9095242bku.20.1329741955083; Mon, 20 Feb 2012 04:45:55 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id fw2sm2933497bkc.13.2012.02.20.04.45.53 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Feb 2012 04:45:54 -0800 (PST) From: Dmitry Kurochkin To: Pieter Praet , Notmuch Mail Subject: Re: [PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to a thread (sending)" In-Reply-To: <1329683908-5435-3-git-send-email-pieter@praet.org> References: <1310313335-4159-1-git-send-email-pieter@praet.org> <1329683908-5435-1-git-send-email-pieter@praet.org> <1329683908-5435-3-git-send-email-pieter@praet.org> User-Agent: Notmuch/0.11.1+188~ga5674c2 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 20 Feb 2012 16:44:32 +0400 Message-ID: <87fwe5lln3.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, 20 Feb 2012 12:46:00 -0000 On Sun, 19 Feb 2012 21:38:26 +0100, Pieter Praet wrote: > As pointed out in the previous commit, the test for replying from > within Emacs didn't actually submit the reply. This one does. > --- > test/emacs | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 41 insertions(+), 0 deletions(-) > > diff --git a/test/emacs b/test/emacs > index 308d749..0f4f42b 100755 > --- a/test/emacs > +++ b/test/emacs > @@ -273,6 +273,47 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite w > EOF > test_expect_equal_file OUTPUT EXPECTED > > +test_begin_subtest "notmuch-search: replying to a thread (sending)" > +$TEST_DIRECTORY/smtp-dummy sent_message & > +smtp_dummy_pid=$! > +test_emacs \ > +'(let ((message-send-mail-function '\''message-smtpmail-send-it) > + (smtpmail-smtp-server "localhost") > + (smtpmail-smtp-service "25025")) > + (notmuch-search "subject:\"testing message sent via SMTP\"") > + (notmuch-test-wait) > + (notmuch-search-reply-to-thread) > + (end-of-buffer) > + (newline) > + (insert "Reply to a message via Emacs with fake SMTP") > + (message-send-and-exit))' >/dev/null 2>&1 > +wait ${smtp_dummy_pid} > +notmuch new >/dev/null > +sed \ > + -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \ > + -e s',^Message-ID: <.*>$,Message-ID: ,' \ > + -e s',^In-Reply-To: <.*>$,In-Reply-To: ,' \ > + -e s',^References: <.*>$,References: ,' \ > + -e s',^Date: .*$,Date: Fri\, 29 Mar 1974 10:05:00 -0000,' < sent_message >OUTPUT This sed command is a (partial) copy past from "Sending a message via (fake) SMTP" test. I suggest adding notmuch_sent_message_sanitize function which would replace common headers with XXX. Replace Date with XXX for Date for consistency with other headers, AFAICT a valid date value is not needed here. Regards, Dmitry > +cat <EXPECTED > +From: Notmuch Test Suite > +To: user@example.com > +Subject: Re: Testing message sent via SMTP > +In-Reply-To: > +References: > +User-Agent: Notmuch/XXX Emacs/XXX > +Date: Fri, 29 Mar 1974 10:05:00 -0000 > +Message-ID: > +MIME-Version: 1.0 > +Content-Type: text/plain; charset=us-ascii > + > +On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite wrote: > +> This is a test that messages are sent via SMTP > + > +Reply to a message via Emacs with fake SMTP > +EOF > +test_expect_equal_file OUTPUT EXPECTED > + > test_begin_subtest "Quote MML tags in reply" > message_id='test-emacs-mml-quoting@message.id' > add_message [id]="$message_id" \ > -- > 1.7.8.1 >