--- /dev/null
+Return-Path: <jani@nikula.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 CC506431FB6\r
+ for <notmuch@notmuchmail.org>; Fri, 9 Mar 2012 00:24:25 -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 PD36ThVEUoly for <notmuch@notmuchmail.org>;\r
+ Fri, 9 Mar 2012 00:24:25 -0800 (PST)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+ [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id E7B82431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 9 Mar 2012 00:24:24 -0800 (PST)\r
+Received: by lahc1 with SMTP id c1so1461737lah.26\r
+ for <notmuch@notmuchmail.org>; Fri, 09 Mar 2012 00:24:21 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+ :mime-version:content-type:x-gm-message-state;\r
+ bh=Vx5txwyr+NxGJca3COSR/enwrJm5Rwns75lCWeN9PTE=;\r
+ b=f25j03GQBVJoHgHpt4tUQwR5yBUpiQw2PtG1FHvuGTdTaxTxkqucmNyl8eaSVp1sya\r
+ KMhzlFjtAa9j1Moyd8CcM1XEXszeNPJNyTlZTFvbCJrl0vp53PflMpe4c+t5ZjtR68aD\r
+ NtIpwNH7ZPUpBE6KDlj4n3hDPAaHrvwCOxBYJAcwECXjM+eKwDegx9cZqaNCvYyb8gsW\r
+ yEaonsyqpP/z8hWGytoz8UmM/5JJ+K0jnGjrL5XjQjnH2pmzkiXvxPiGJ06R3JB9X+ml\r
+ LJrbUqAnJBydxSyB8dhdeoOfVehZaNe8e36Itm6yGNjlAhHR13E1E4JgrcDIiFr9VB4k\r
+ Eq8A==\r
+Received: by 10.112.87.225 with SMTP id bb1mr451713lbb.59.1331281461803;\r
+ Fri, 09 Mar 2012 00:24:21 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
+ [84.248.80.253])\r
+ by mx.google.com with ESMTPS id hv2sm5591916lbb.9.2012.03.09.00.24.19\r
+ (version=SSLv3 cipher=OTHER); Fri, 09 Mar 2012 00:24:20 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/2] test: use subtest name for generated message subject\r
+ by default\r
+In-Reply-To: <1327961195-4204-2-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1327961195-4204-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+ <1327961195-4204-2-git-send-email-dmitry.kurochkin@gmail.com>\r
+User-Agent: Notmuch/0.11.1+295~g780f284 (http://notmuchmail.org) Emacs/23.3.1\r
+ (i686-pc-linux-gnu)\r
+Date: Fri, 09 Mar 2012 10:24:17 +0200\r
+Message-ID: <87ipie89n2.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQkeHRZAKO6jbPqu/2YiOwXzehR11mRE9Hv0woG2LJJeTlW0uTtnPtYuvoTivsZG2Qb+LPpU\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: Fri, 09 Mar 2012 08:24:25 -0000\r
+\r
+\r
+Hi Dmitry, I tagged this notmuch::stale as it no longer cleanly applies\r
+to master.\r
+\r
+BR,\r
+Jani.\r
+\r
+On Tue, 31 Jan 2012 02:06:35 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
+> Before the change, messages generated by generate_message() used "Test\r
+> message #N" for default subject where N is the generated messages\r
+> counter. Since message subject is commonly present in expected\r
+> results, there is a chance of breaking other tests when a new\r
+> generate_message() call is added. The patch changes default subject\r
+> value for generated messages to subtest name if it is available. If\r
+> subtest name is not available (i.e. message is generated during test\r
+> initialization), the old default value is used (in this case it is\r
+> fine to have the counter in the subject).\r
+> \r
+> Another benefit of this change is a sane default value for subject in\r
+> generated messages, which would allow to simplify code like:\r
+> \r
+> test_begin_subtest "test for a cool feature"\r
+> add_message [subject]="message for test for a cool feature"\r
+> ---\r
+> test/encoding | 2 +-\r
+> test/search-folder-coherence | 2 +-\r
+> test/test-lib.sh | 6 +++++-\r
+> 3 files changed, 7 insertions(+), 3 deletions(-)\r
+> \r
+> diff --git a/test/encoding b/test/encoding\r
+> index 33259c1..dbaceb0 100755\r
+> --- a/test/encoding\r
+> +++ b/test/encoding\r
+> @@ -9,7 +9,7 @@ output=$(notmuch show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize)\r
+> test_expect_equal "$output" "\f\r
+message{ id:msg-001@notmuch-test-suite depth:0 match:1 filename:/XXX/mail/msg-001\r
+> \f\r
+header{\r
+> Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread)\r
+> -Subject: Test message #1\r
+> +Subject: Message with text of unknown charset\r
+> From: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+> To: Notmuch Test Suite <test_suite@notmuchmail.org>\r
+> Date: Fri, 05 Jan 2001 15:43:57 +0000\r
+> diff --git a/test/search-folder-coherence b/test/search-folder-coherence\r
+> index f8119cb..3f6ec76 100755\r
+> --- a/test/search-folder-coherence\r
+> +++ b/test/search-folder-coherence\r
+> @@ -32,7 +32,7 @@ test_expect_equal_file OUTPUT EXPECTED\r
+> \r
+> test_begin_subtest "Test matches folder:spam"\r
+> output=$(notmuch search folder:spam)\r
+> -test_expect_equal "$output" "thread:0000000000000001 2001-01-05 [1/1] Notmuch Test Suite; Test message #1 (inbox unread)"\r
+> +test_expect_equal "$output" "thread:0000000000000001 2001-01-05 [1/1] Notmuch Test Suite; Single new message (inbox unread)"\r
+> \r
+> test_begin_subtest "Remove folder:spam copy of email"\r
+> rm $dir/spam/$(basename $file_x)\r
+> diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+> index 8158328..94efdc1 100644\r
+> --- a/test/test-lib.sh\r
+> +++ b/test/test-lib.sh\r
+> @@ -318,7 +318,11 @@ generate_message ()\r
+> fi\r
+> \r
+> if [ -z "${template[subject]}" ]; then\r
+> - template[subject]="Test message #${gen_msg_cnt}"\r
+> + if [ -n "$test_subtest_name" ]; then\r
+> + template[subject]="$test_subtest_name"\r
+> + else\r
+> + template[subject]="Test message #${gen_msg_cnt}"\r
+> + fi\r
+> fi\r
+> \r
+> if [ -z "${template[date]}" ]; then\r
+> -- \r
+> 1.7.8.3\r
+> \r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r