--- /dev/null
+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 94783431FD9\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:15 -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 RzQqKcKTn1Pu for <notmuch@notmuchmail.org>;\r
+ Sun, 19 Feb 2012 12:41:14 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 502C8431FC2 for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:14 -0800\r
+ (PST)\r
+Received: by mail-ww0-f45.google.com with SMTP id dt12so4004483wgb.2\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:41:13 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+ 10.180.92.73 as permitted sender) client-ip=10.180.92.73; \r
+Authentication-Results: mr.google.com;\r
+ spf=pass (google.com: domain of pieter@praet.org\r
+ designates 10.180.92.73 as permitted sender)\r
+ smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.180.92.73])\r
+ by 10.180.92.73 with SMTP id ck9mr12029838wib.2.1329684073991 (num_hops\r
+ = 1); Sun, 19 Feb 2012 12:41:13 -0800 (PST)\r
+MIME-Version: 1.0\r
+Received: by 10.180.92.73 with SMTP id ck9mr10019400wib.2.1329684073919;\r
+ Sun, 19 Feb 2012 12:41:13 -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 fl2sm29208385wib.4.2012.02.19.12.41.13\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sun, 19 Feb 2012 12:41:13 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH v2 3/4] test: emacs: new test "notmuch-search: when reply is\r
+ sent, parent message should be tagged 'replied'"\r
+Date: Sun, 19 Feb 2012 21:38:27 +0100\r
+Message-Id: <1329683908-5435-4-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
+ ALoCoQk2Niu8Vz4awytUDrVb0E4MvxumvHKaSMapbBbePjUnAJbA+fM2/rKBYahFqYbEIAH0eRZn\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:16 -0000\r
+\r
+When a message is replied to, it should be tagged `replied'.\r
+---\r
+ test/emacs | 5 +++++\r
+ 1 files changed, 5 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 0f4f42b..b0fb760 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -314,6 +314,11 @@ Reply to a message via Emacs with fake SMTP\r
+ EOF\r
+ test_expect_equal_file OUTPUT EXPECTED\r
+ \r
++test_begin_subtest "notmuch-search: when reply is sent, the parent message should be tagged 'replied'"\r
++# depends on subtest "notmuch-search: replying to a thread (sending)"\r
++output=$(notmuch search 'tag:replied' | notmuch_search_sanitize)\r
++test_expect_equal "$output" "thread:XXX 2000-01-01 [1/2] Notmuch Test Suite; Testing message sent via SMTP (inbox replied)"\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