From cac189e37bd9ad802d09169fe6c49d86ca18f0d5 Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Sun, 19 Feb 2012 21:38:26 +0100 Subject: [PATCH] [PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to a thread (sending)" --- 1b/e18d92632a51b98dd5b6ace76534d22a65c7be | 127 ++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 1b/e18d92632a51b98dd5b6ace76534d22a65c7be diff --git a/1b/e18d92632a51b98dd5b6ace76534d22a65c7be b/1b/e18d92632a51b98dd5b6ace76534d22a65c7be new file mode 100644 index 000000000..314ec0099 --- /dev/null +++ b/1b/e18d92632a51b98dd5b6ace76534d22a65c7be @@ -0,0 +1,127 @@ +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 D52C4431FC7 + for ; Sun, 19 Feb 2012 12:41:13 -0800 (PST) +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 U4sKHtaHs+ZW for ; + Sun, 19 Feb 2012 12:41:11 -0800 (PST) +Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com + [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + A036C431FC2 for ; Sun, 19 Feb 2012 12:41:11 -0800 + (PST) +Received: by wgbdt11 with SMTP id dt11so2733452wgb.2 + for ; Sun, 19 Feb 2012 12:41:10 -0800 (PST) +Received-SPF: pass (google.com: domain of pieter@praet.org designates + 10.180.94.68 as permitted sender) client-ip=10.180.94.68; +Authentication-Results: mr.google.com; + spf=pass (google.com: domain of pieter@praet.org + designates 10.180.94.68 as permitted sender) + smtp.mail=pieter@praet.org +Received: from mr.google.com ([10.180.94.68]) + by 10.180.94.68 with SMTP id da4mr11786172wib.22.1329684070357 + (num_hops = 1); Sun, 19 Feb 2012 12:41:10 -0800 (PST) +MIME-Version: 1.0 +Received: by 10.180.94.68 with SMTP id da4mr9873488wib.22.1329684070262; + Sun, 19 Feb 2012 12:41:10 -0800 (PST) +Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be. + [81.242.218.104]) + by mx.google.com with ESMTPS id p10sm11687441wic.0.2012.02.19.12.41.09 + (version=TLSv1/SSLv3 cipher=OTHER); + Sun, 19 Feb 2012 12:41:09 -0800 (PST) +From: Pieter Praet +To: Notmuch Mail +Subject: [PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to a + thread (sending)" +Date: Sun, 19 Feb 2012 21:38:26 +0100 +Message-Id: <1329683908-5435-3-git-send-email-pieter@praet.org> +X-Mailer: git-send-email 1.7.8.1 +In-Reply-To: <1329683908-5435-1-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> +X-Gm-Message-State: + ALoCoQkLOAFLFJ1yjtjj6BqJp29GDsVUsVgjAW5eTSlJUsmXxdncnp1z8yDqyNcYsUbE6uglYz0n +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, 19 Feb 2012 20:41:14 -0000 + +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 ++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 + -- 2.26.2