Re: [RFC PATCH v5 09/11] test: update tests to reflect the exclude flag
authorAustin Clements <amdragon@MIT.EDU>
Fri, 24 Feb 2012 23:47:10 +0000 (18:47 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:56 +0000 (09:44 -0800)
39/7a86cdde142236ee98c0a5ca9c5ca38b0496c8 [new file with mode: 0644]

diff --git a/39/7a86cdde142236ee98c0a5ca9c5ca38b0496c8 b/39/7a86cdde142236ee98c0a5ca9c5ca38b0496c8
new file mode 100644 (file)
index 0000000..16c9396
--- /dev/null
@@ -0,0 +1,376 @@
+Return-Path: <amdragon@mit.edu>\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 614B841638B\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:47:15 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.699\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
+       tests=[NORMAL_HTTP_TO_IP=0.001, RCVD_IN_DNSWL_LOW=-0.7]\r
+       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 H82eo9tcoFLG for <notmuch@notmuchmail.org>;\r
+       Fri, 24 Feb 2012 15:47:13 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 4A390415CDF\r
+       for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:47:13 -0800 (PST)\r
+X-AuditID: 12074422-b7fd66d0000008f9-5d-4f48218096d8\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id EA.09.02297.081284F4; Fri, 24 Feb 2012 18:47:12 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q1ONlCr1006670; \r
+       Fri, 24 Feb 2012 18:47:12 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1ONlAK2026749\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Fri, 24 Feb 2012 18:47:11 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1S14r0-0000is-HZ; Fri, 24 Feb 2012 18:47:10 -0500\r
+Date: Fri, 24 Feb 2012 18:47:10 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [RFC PATCH v5 09/11] test: update tests to reflect the exclude\r
+       flag\r
+Message-ID: <20120224234710.GI30513@mit.edu>\r
+References: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>\r
+       <1329296619-7463-10-git-send-email-markwalters1009@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=iso-8859-1\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <1329296619-7463-10-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrGKsWRmVeSWpSXmKPExsUixG6nrtug6OFv8LbPwGL1XB6L6zdnMjsw\r
+       eeycdZfd49mqW8wBTFFcNimpOZllqUX6dglcGVt6VzAXzGllrNj0xb2BcX9RFyMHh4SAicSq\r
+       3T5djJxAppjEhXvr2boYuTiEBPYxSjTOfw3lbGCU2Pu7nRXCOckksW/nKihnCaPEuyc7WEH6\r
+       WQRUJeb3n2YGsdkENCS27V/OCGKLCOhI3D60gB3EZhaQlvj2u5kJxBYWCJI4eO8uK8gZvEA1\r
+       K25XQszsYJTY+uccC0gNr4CgxMmZT1ggenUkdm69wwZSDzJn+T8OiLC8RPPW2WBrOQW8JP5t\r
+       vQA2XlRARWLKyW1sExiFZyGZNAvJpFkIk2YhmbSAkWUVo2xKbpVubmJmTnFqsm5xcmJeXmqR\r
+       rqlebmaJXmpK6SZGcBS4KO1g/HlQ6RCjAAejEg8v0xZ3fyHWxLLiytxDjJIcTEqivOayHv5C\r
+       fEn5KZUZicUZ8UWlOanFhxglOJiVRHjt2IByvCmJlVWpRfkwKWkOFiVxXnWtd35CAumJJanZ\r
+       qakFqUUwWRkODiUJ3tMKQI2CRanpqRVpmTklCGkmDk6Q4TxAwx+C1PAWFyTmFmemQ+RPMepy\r
+       rF28+SKjEEtefl6qlDjvY5AiAZCijNI8uDmw5PWKURzoLWHeFyBVPMDEBzfpFdASJqAl9n9d\r
+       QZaUJCKkpBoY7TlVjx68FsjxKiX47YlXlenn7525KvV1tv+Fz5MYxcNEPXqF3BamtZ48f2vT\r
+       Nw37iLZPr99OiZdiOj4tyvXRyjA2cYMY5k9SUkrlRVVJF+50HujM07yucrngWrX7JFHbo/KH\r
+       /Iw7oh7JLjP/LLVbYFnzRpdZcUfu7T2gUbpP0pnV7/b7i3LzlFiKMxINtZiLihMBPiDQrTkD        AAA=\r
+Cc: notmuch@notmuchmail.org\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, 24 Feb 2012 23:47:15 -0000\r
+\r
+Did you mean to put this one right after the show format update,\r
+rather than having the man update between the two?  (I would argue\r
+that this should go in the same patch as the show format update so\r
+that the tests never fail, but people seem to disagree about this.)\r
+\r
+Quoth Mark Walters on Feb 15 at  9:03 am:\r
+> notmuch show outputs the exclude flag so many tests using notmuch\r
+> show failed. This commit adds "excluded:0" or "excluded: false" to\r
+> the expected outputs. After this commit there should be no failing\r
+> tests.\r
+> ---\r
+>  test/crypto        |    9 ++++++++-\r
+>  test/encoding      |    2 +-\r
+>  test/json          |    6 +++---\r
+>  test/maildir-sync  |    1 +\r
+>  test/multipart     |    4 ++--\r
+>  test/thread-naming |   16 ++++++++--------\r
+>  6 files changed, 23 insertions(+), 15 deletions(-)\r
+> \r
+> diff --git a/test/crypto b/test/crypto\r
+> index 1dbb60a..564cf9a 100755\r
+> --- a/test/crypto\r
+> +++ b/test/crypto\r
+> @@ -43,6 +43,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+>  expected='[[[{"id": "XXXXX",\r
+>   "match": true,\r
+> + "excluded": false,\r
+>   "filename": "YYYYY",\r
+>   "timestamp": 946728000,\r
+>   "date_relative": "2000-01-01",\r
+> @@ -77,6 +78,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+>  expected='[[[{"id": "XXXXX",\r
+>   "match": true,\r
+> + "excluded": false,\r
+>   "filename": "YYYYY",\r
+>   "timestamp": 946728000,\r
+>   "date_relative": "2000-01-01",\r
+> @@ -113,6 +115,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+>  expected='[[[{"id": "XXXXX",\r
+>   "match": true,\r
+> + "excluded": false,\r
+>   "filename": "YYYYY",\r
+>   "timestamp": 946728000,\r
+>   "date_relative": "2000-01-01",\r
+> @@ -153,7 +156,7 @@ test_begin_subtest "decryption, --format=text"\r
+>  output=$(notmuch show --format=text --decrypt subject:"test encrypted message 001" \\r
+>      | notmuch_show_sanitize_all \\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+> -expected='\f\r
+message{ id:XXXXX depth:0 match:1 filename:XXXXX\r
+> +expected='\f\r
+message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2000-01-01) (encrypted inbox)\r
+>  Subject: test encrypted message 001\r
+> @@ -187,6 +190,7 @@ output=$(notmuch show --format=json --decrypt subject:"test encrypted message 00\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+>  expected='[[[{"id": "XXXXX",\r
+>   "match": true,\r
+> + "excluded": false,\r
+>   "filename": "YYYYY",\r
+>   "timestamp": 946728000,\r
+>   "date_relative": "2000-01-01",\r
+> @@ -242,6 +246,7 @@ output=$(notmuch show --format=json --decrypt subject:"test encrypted message 00\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+>  expected='[[[{"id": "XXXXX",\r
+>   "match": true,\r
+> + "excluded": false,\r
+>   "filename": "YYYYY",\r
+>   "timestamp": 946728000,\r
+>   "date_relative": "2000-01-01",\r
+> @@ -277,6 +282,7 @@ output=$(notmuch show --format=json --decrypt subject:"test encrypted message 00\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+>  expected='[[[{"id": "XXXXX",\r
+>   "match": true,\r
+> + "excluded": false,\r
+>   "filename": "YYYYY",\r
+>   "timestamp": 946728000,\r
+>   "date_relative": "2000-01-01",\r
+> @@ -332,6 +338,7 @@ output=$(notmuch show --format=json --verify subject:"test signed message 001" \\r
+>      | sed -e 's|"created": [1234567890]*|"created": 946728000|')\r
+>  expected='[[[{"id": "XXXXX",\r
+>   "match": true,\r
+> + "excluded": false,\r
+>   "filename": "YYYYY",\r
+>   "timestamp": 946728000,\r
+>   "date_relative": "2000-01-01",\r
+> diff --git a/test/encoding b/test/encoding\r
+> index 33259c1..a872345 100755\r
+> --- a/test/encoding\r
+> +++ b/test/encoding\r
+> @@ -6,7 +6,7 @@ test_begin_subtest "Message with text of unknown charset"\r
+>  add_message '[content-type]="text/plain; charset=unknown-8bit"' \\r
+>          "[body]=irrelevant"\r
+>  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
+> +test_expect_equal "$output" "\f\r
+message{ id:msg-001@notmuch-test-suite depth:0 match:1 excluded:0 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
+> diff --git a/test/json b/test/json\r
+> index 7df4380..f95fcf8 100755\r
+> --- a/test/json\r
+> +++ b/test/json\r
+> @@ -5,7 +5,7 @@ test_description="--format=json output"\r
+>  test_begin_subtest "Show message: json"\r
+>  add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\""\r
+>  output=$(notmuch show --format=json "json-show-message")\r
+> -test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"\r
+> +test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]"\r
+>  \r
+>  test_begin_subtest "Search message: json"\r
+>  add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\""\r
+> @@ -22,7 +22,7 @@ test_expect_equal "$output" "[{\"thread\": \"XXX\",\r
+>  test_begin_subtest "Show message: json, utf-8"\r
+>  add_message "[subject]=\"json-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""\r
+>  output=$(notmuch show --format=json "jsön-show-méssage")\r
+> -test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"\r
+> +test_expect_equal "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true, \"excluded\": false, \"filename\": \"${gen_msg_filename}\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\",\"unread\"], \"headers\": {\"Subject\": \"json-show-utf8-body-sübjéct\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]"\r
+>  \r
+>  test_begin_subtest "Show message: json, inline attachment filename"\r
+>  subject='json-show-inline-attachment-filename'\r
+> @@ -35,7 +35,7 @@ emacs_deliver_message \\r
+>       (insert \"Message-ID: <$id>\n\")"\r
+>  output=$(notmuch show --format=json "id:$id")\r
+>  filename=$(notmuch search --output=files "id:$id")\r
+> -test_expect_equal "$output" "[[[{\"id\": \"$id\", \"match\": true, \"filename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"filename\": \"README\"}]}]}, []]]]"\r
+> +test_expect_equal "$output" "[[[{\"id\": \"$id\", \"match\": true, \"excluded\": false, \"filename\": \"$filename\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"tags\": [\"inbox\"], \"headers\": {\"Subject\": \"$subject\", \"From\": \"Notmuch Test Suite <test_suite@notmuchmail.org>\", \"To\": \"test_suite@notmuchmail.org\", \"Cc\": \"\", \"Bcc\": \"\", \"Date\": \"01 Jan 2000 12:00:00 -0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"multipart/mixed\", \"content\": [{\"id\": 2, \"content-type\": \"text/plain\", \"content\": \"This is a test message with inline attachment with a filename\"}, {\"id\": 3, \"content-type\": \"application/octet-stream\", \"filename\": \"README\"}]}]}, []]]]"\r
+>  \r
+>  test_begin_subtest "Search message: json, utf-8"\r
+>  add_message "[subject]=\"json-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""\r
+> diff --git a/test/maildir-sync b/test/maildir-sync\r
+> index d5872a5..dfa3966 100755\r
+> --- a/test/maildir-sync\r
+> +++ b/test/maildir-sync\r
+> @@ -46,6 +46,7 @@ test_begin_subtest "notmuch show works with renamed file (without notmuch new)"\r
+>  output=$(notmuch show --format=json id:${gen_msg_id} | filter_show_json)\r
+>  test_expect_equal "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite",\r
+>  "match": true,\r
+> +"excluded": false,\r
+>  "filename": "MAIL_DIR/cur/adding-replied-tag:2,RS",\r
+>  "timestamp": 978709437,\r
+>  "date_relative": "2001-01-05",\r
+> diff --git a/test/multipart b/test/multipart\r
+> index 2dd73f5..3d2dcfc 100755\r
+> --- a/test/multipart\r
+> +++ b/test/multipart\r
+> @@ -108,7 +108,7 @@ notmuch new > /dev/null\r
+>  test_begin_subtest "--format=text --part=0, full message"\r
+>  notmuch show --format=text --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT\r
+>  cat <<EOF >EXPECTED\r
+> -\f\r
+message{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 filename:${MAIL_DIR}/multipart\r
+> +\f\r
+message{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 excluded:0 filename:${MAIL_DIR}/multipart\r
+>  \f\r
+header{\r
+>  Carl Worth <cworth@cworth.org> (2001-01-05) (attachment inbox signed unread)\r
+>  Subject: Multipart message\r
+> @@ -322,7 +322,7 @@ notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' | s\r
+>  echo >>OUTPUT # expect *no* newline at end of output\r
+>  cat <<EOF >EXPECTED\r
+>  \r
+> -{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "${MAIL_DIR}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [\r
+> +{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "excluded": false, "filename": "${MAIL_DIR}/multipart", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [\r
+>  {"id": 1, "content-type": "multipart/signed", "content": [\r
+>  {"id": 2, "content-type": "multipart/mixed", "content": [\r
+>  {"id": 3, "content-type": "message/rfc822", "content": [{"headers": {"From": "Carl Worth <cworth@cworth.org>", "To": "cworth@cworth.org", "Subject": "html message", "Date": "Fri, 05 Jan 2001 15:42:57 +0000"}, "body": [\r
+> diff --git a/test/thread-naming b/test/thread-naming\r
+> index 942e593..1a1a48f 100755\r
+> --- a/test/thread-naming\r
+> +++ b/test/thread-naming\r
+> @@ -65,7 +65,7 @@ test_expect_equal "$output" "thread:XXX   2001-01-12 [6/8] Notmuch Test Suite; t\r
+>  \r
+>  test_begin_subtest 'Test order of messages in "notmuch show"'\r
+>  output=$(notmuch show thread-naming | notmuch_show_sanitize)\r
+> -test_expect_equal "$output" "\f\r
+message{ id:msg-$(printf "%03d" $first)@notmuch-test-suite depth:0 match:1 filename:/XXX/mail/msg-$(printf "%03d" $first)\r
+> +test_expect_equal "$output" "\f\r
+message{ id:msg-$(printf "%03d" $first)@notmuch-test-suite depth:0 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $first)\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (unread)\r
+>  Subject: thread-naming: Initial thread subject\r
+> @@ -79,7 +79,7 @@ This is just a test message (#$first)\r
+>  \f\r
+part}\r
+>  \f\r
+body}\r
+>  \f\r
+message}\r
+> -\f\r
+message{ id:msg-$(printf "%03d" $((first + 1)))@notmuch-test-suite depth:1 match:1 filename:/XXX/mail/msg-$(printf "%03d" $((first + 1)))\r
+> +\f\r
+message{ id:msg-$(printf "%03d" $((first + 1)))@notmuch-test-suite depth:1 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $((first + 1)))\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-06) (inbox unread)\r
+>  Subject: thread-naming: Older changed subject\r
+> @@ -93,7 +93,7 @@ This is just a test message (#$((first + 1)))\r
+>  \f\r
+part}\r
+>  \f\r
+body}\r
+>  \f\r
+message}\r
+> -\f\r
+message{ id:msg-$(printf "%03d" $((first + 2)))@notmuch-test-suite depth:1 match:1 filename:/XXX/mail/msg-$(printf "%03d" $((first + 2)))\r
+> +\f\r
+message{ id:msg-$(printf "%03d" $((first + 2)))@notmuch-test-suite depth:1 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $((first + 2)))\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-07) (inbox unread)\r
+>  Subject: thread-naming: Newer changed subject\r
+> @@ -107,7 +107,7 @@ This is just a test message (#$((first + 2)))\r
+>  \f\r
+part}\r
+>  \f\r
+body}\r
+>  \f\r
+message}\r
+> -\f\r
+message{ id:msg-$(printf "%03d" $((first + 3)))@notmuch-test-suite depth:1 match:1 filename:/XXX/mail/msg-$(printf "%03d" $((first + 3)))\r
+> +\f\r
+message{ id:msg-$(printf "%03d" $((first + 3)))@notmuch-test-suite depth:1 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $((first + 3)))\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-08) (unread)\r
+>  Subject: thread-naming: Final thread subject\r
+> @@ -121,7 +121,7 @@ This is just a test message (#$((first + 3)))\r
+>  \f\r
+part}\r
+>  \f\r
+body}\r
+>  \f\r
+message}\r
+> -\f\r
+message{ id:msg-$(printf "%03d" $((first + 4)))@notmuch-test-suite depth:1 match:1 filename:/XXX/mail/msg-$(printf "%03d" $((first + 4)))\r
+> +\f\r
+message{ id:msg-$(printf "%03d" $((first + 4)))@notmuch-test-suite depth:1 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $((first + 4)))\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-09) (inbox unread)\r
+>  Subject: Re: thread-naming: Initial thread subject\r
+> @@ -135,7 +135,7 @@ This is just a test message (#$((first + 4)))\r
+>  \f\r
+part}\r
+>  \f\r
+body}\r
+>  \f\r
+message}\r
+> -\f\r
+message{ id:msg-$(printf "%03d" $((first + 5)))@notmuch-test-suite depth:1 match:1 filename:/XXX/mail/msg-$(printf "%03d" $((first + 5)))\r
+> +\f\r
+message{ id:msg-$(printf "%03d" $((first + 5)))@notmuch-test-suite depth:1 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $((first + 5)))\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-10) (inbox unread)\r
+>  Subject: Aw: thread-naming: Initial thread subject\r
+> @@ -149,7 +149,7 @@ This is just a test message (#$((first + 5)))\r
+>  \f\r
+part}\r
+>  \f\r
+body}\r
+>  \f\r
+message}\r
+> -\f\r
+message{ id:msg-$(printf "%03d" $((first + 6)))@notmuch-test-suite depth:1 match:1 filename:/XXX/mail/msg-$(printf "%03d" $((first + 6)))\r
+> +\f\r
+message{ id:msg-$(printf "%03d" $((first + 6)))@notmuch-test-suite depth:1 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $((first + 6)))\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-11) (inbox unread)\r
+>  Subject: Vs: thread-naming: Initial thread subject\r
+> @@ -163,7 +163,7 @@ This is just a test message (#$((first + 6)))\r
+>  \f\r
+part}\r
+>  \f\r
+body}\r
+>  \f\r
+message}\r
+> -\f\r
+message{ id:msg-$(printf "%03d" $((first + 7)))@notmuch-test-suite depth:1 match:1 filename:/XXX/mail/msg-$(printf "%03d" $((first + 7)))\r
+> +\f\r
+message{ id:msg-$(printf "%03d" $((first + 7)))@notmuch-test-suite depth:1 match:1 excluded:0 filename:/XXX/mail/msg-$(printf "%03d" $((first + 7)))\r
+>  \f\r
+header{\r
+>  Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-12) (inbox unread)\r
+>  Subject: Sv: thread-naming: Initial thread subject\r