[PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to a thread (sending)"
authorPieter Praet <pieter@praet.org>
Sun, 19 Feb 2012 20:38:26 +0000 (21:38 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:41 +0000 (09:44 -0800)
1b/e18d92632a51b98dd5b6ace76534d22a65c7be [new file with mode: 0644]

diff --git a/1b/e18d92632a51b98dd5b6ace76534d22a65c7be b/1b/e18d92632a51b98dd5b6ace76534d22a65c7be
new file mode 100644 (file)
index 0000000..314ec00
--- /dev/null
@@ -0,0 +1,127 @@
+Return-Path: <pieter@praet.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id D52C4431FC7\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:13 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id U4sKHtaHs+ZW for <notmuch@notmuchmail.org>;\r
+       Sun, 19 Feb 2012 12:41:11 -0800 (PST)\r
+Received: from mail-ww0-f41.google.com (mail-ww0-f41.google.com\r
+ [74.125.82.41])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ A036C431FC2   for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:11 -0800\r
+ (PST)\r
+Received: by wgbdt11 with SMTP id dt11so2733452wgb.2\r
+       for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:10 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+       10.180.94.68 as permitted sender) client-ip=10.180.94.68; \r
+Authentication-Results: mr.google.com;\r
+       spf=pass (google.com: domain of pieter@praet.org\r
+       designates 10.180.94.68 as permitted sender)\r
+       smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.94.68])\r
+       by 10.180.94.68 with SMTP id da4mr11786172wib.22.1329684070357\r
+       (num_hops = 1); Sun, 19 Feb 2012 12:41:10 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.180.94.68 with SMTP id da4mr9873488wib.22.1329684070262;\r
+       Sun, 19 Feb 2012 12:41:10 -0800 (PST)\r
+Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be.\r
+       [81.242.218.104])\r
+       by mx.google.com with ESMTPS id p10sm11687441wic.0.2012.02.19.12.41.09\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 19 Feb 2012 12:41:09 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH v2 2/4] test: emacs: new test "notmuch-search: replying to a\r
+       thread (sending)"\r
+Date: Sun, 19 Feb 2012 21:38:26 +0100\r
+Message-Id: <1329683908-5435-3-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.8.1\r
+In-Reply-To: <1329683908-5435-1-git-send-email-pieter@praet.org>\r
+References: <1310313335-4159-1-git-send-email-pieter@praet.org>\r
+       <1329683908-5435-1-git-send-email-pieter@praet.org>\r
+X-Gm-Message-State:\r
+ ALoCoQkLOAFLFJ1yjtjj6BqJp29GDsVUsVgjAW5eTSlJUsmXxdncnp1z8yDqyNcYsUbE6uglYz0n\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 19 Feb 2012 20:41:14 -0000\r
+\r
+As pointed out in the previous commit, the test for replying from\r
+within Emacs didn't actually submit the reply. This one does.\r
+---\r
+ test/emacs |   41 +++++++++++++++++++++++++++++++++++++++++\r
+ 1 files changed, 41 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 308d749..0f4f42b 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -273,6 +273,47 @@ On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> w\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+ \r
++test_begin_subtest "notmuch-search: replying to a thread (sending)"\r
++$TEST_DIRECTORY/smtp-dummy sent_message &\r
++smtp_dummy_pid=$!\r
++test_emacs \\r
++'(let ((message-send-mail-function '\''message-smtpmail-send-it)\r
++       (smtpmail-smtp-server "localhost")\r
++       (smtpmail-smtp-service "25025"))\r
++  (notmuch-search "subject:\"testing message sent via SMTP\"")\r
++  (notmuch-test-wait)\r
++  (notmuch-search-reply-to-thread)\r
++  (end-of-buffer)\r
++  (newline)\r
++  (insert "Reply to a message via Emacs with fake SMTP")\r
++  (message-send-and-exit))' >/dev/null 2>&1\r
++wait ${smtp_dummy_pid}\r
++notmuch new >/dev/null\r
++sed \\r
++    -e s',^User-Agent: Notmuch/.* Emacs/.*,User-Agent: Notmuch/XXX Emacs/XXX,' \\r
++    -e s',^Message-ID: <.*>$,Message-ID: <XXX>,' \\r
++    -e s',^In-Reply-To: <.*>$,In-Reply-To: <XXX>,' \\r
++    -e s',^References: <.*>$,References: <XXX>,' \\r
++    -e s',^Date: .*$,Date: Fri\, 29 Mar 1974 10:05:00 -0000,' < sent_message >OUTPUT\r
++cat <<EOF >EXPECTED\r
++From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
++To: user@example.com\r
++Subject: Re: Testing message sent via SMTP\r
++In-Reply-To: <XXX>\r
++References: <XXX>\r
++User-Agent: Notmuch/XXX Emacs/XXX\r
++Date: Fri, 29 Mar 1974 10:05:00 -0000\r
++Message-ID: <XXX>\r
++MIME-Version: 1.0\r
++Content-Type: text/plain; charset=us-ascii\r
++\r
++On 01 Jan 2000 12:00:00 -0000, Notmuch Test Suite <test_suite@notmuchmail.org> wrote:\r
++> This is a test that messages are sent via SMTP\r
++\r
++Reply to a message via Emacs with fake SMTP\r
++EOF\r
++test_expect_equal_file OUTPUT EXPECTED\r
++\r
+ test_begin_subtest "Quote MML tags in reply"\r
+ message_id='test-emacs-mml-quoting@message.id'\r
+ add_message [id]="$message_id" \\r
+-- \r
+1.7.8.1\r
+\r