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 405B4429E40 for ; Sun, 10 Jul 2011 08:56:20 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[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 wfHH4NtAoBLc for ; Sun, 10 Jul 2011 08:56:19 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 19C36431FB6 for ; Sun, 10 Jul 2011 08:56:18 -0700 (PDT) Received: by mail-ww0-f45.google.com with SMTP id 40so1521868wwj.2 for ; Sun, 10 Jul 2011 08:56:18 -0700 (PDT) Received: by 10.216.38.77 with SMTP id z55mr3223019wea.105.1310313378635; Sun, 10 Jul 2011 08:56:18 -0700 (PDT) Received: from localhost ([109.131.150.231]) by mx.google.com with ESMTPS id n17sm5055082wed.16.2011.07.10.08.56.17 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 10 Jul 2011 08:56:17 -0700 (PDT) From: Pieter Praet To: Notmuch Mail Subject: [PATCH 2/6] test: emacs: add test for sending a reply from within Emacs Date: Sun, 10 Jul 2011 17:55:31 +0200 Message-Id: <1310313335-4159-3-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310313335-4159-1-git-send-email-pieter@praet.org> References: <1310313335-4159-1-git-send-email-pieter@praet.org> 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, 10 Jul 2011 15:56:20 -0000 As pointed out in the previous commit, the test for replying from within Emacs didn't actually submit the reply. This one does. Signed-off-by: Pieter Praet --- test/emacs | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index ac3a246..f277653 100755 --- a/test/emacs +++ b/test/emacs @@ -257,6 +257,49 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite w EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Send reply from within Emacs" +$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) + (message-goto-to) + (message-goto-body) + (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 +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 "Save attachment from within emacs using notmuch-show-save-attachments" # save as archive to test that Emacs does not re-compress .gz test_emacs '(let ((standard-input "\"attachment1.gz\"")) -- 1.7.5.4