Re: [PATCH 1/1] Fixing failing JSON tests.
authorAustin Clements <amdragon@MIT.EDU>
Tue, 4 Dec 2012 14:35:41 +0000 (09:35 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:51:26 +0000 (09:51 -0800)
00/6232f5edf2630786660319c14ce5b657359dee [new file with mode: 0644]

diff --git a/00/6232f5edf2630786660319c14ce5b657359dee b/00/6232f5edf2630786660319c14ce5b657359dee
new file mode 100644 (file)
index 0000000..158a82f
--- /dev/null
@@ -0,0 +1,118 @@
+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 68437431FAE\r
+       for <notmuch@notmuchmail.org>; Tue,  4 Dec 2012 06:35:49 -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 VL082vql5Niy for <notmuch@notmuchmail.org>;\r
+       Tue,  4 Dec 2012 06:35:45 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU\r
+       [18.9.25.13])\r
+       by olra.theworths.org (Postfix) with ESMTP id 60180431FB6\r
+       for <notmuch@notmuchmail.org>; Tue,  4 Dec 2012 06:35:45 -0800 (PST)\r
+X-AuditID: 1209190d-b7f266d00000092b-7f-50be0a40c546\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 85.83.02347.04A0EB05; Tue,  4 Dec 2012 09:35:44 -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 qB4EZhir009174; \r
+       Tue, 4 Dec 2012 09:35:44 -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 qB4EZfVe002533\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Tue, 4 Dec 2012 09:35:42 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Tftb3-0000LT-Ad; Tue, 04 Dec 2012 09:35:41 -0500\r
+Date: Tue, 4 Dec 2012 09:35:41 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Peter Feigl <craven@gmx.net>\r
+Subject: Re: [PATCH 1/1] Fixing failing JSON tests.\r
+Message-ID: <20121204143541.GI1020@mit.edu>\r
+References: <1354628805-2148-1-git-send-email-craven@gmx.net>\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: <1354628805-2148-1-git-send-email-craven@gmx.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFprFKsWRmVeSWpSXmKPExsUixG6nruvAtS/A4P0sRYu9De2MFtdvzmR2\r
+       YPJYvGk/m8ezVbeYA5iiuGxSUnMyy1KL9O0SuDJmXWlkKvggUfFoX3ID4zfRLkYODgkBE4m9\r
+       jw27GDmBTDGJC/fWs3UxcnEICexjlPi5fj07hLOeUWLvpXssEM4FJokj3Z9ZIZwljBKLzrWz\r
+       gvSzCKhIPHl/gwXEZhPQkNi2fzkjiC0ioCDxbF0TmM0sIC3x7XczE4gtLGAsMWfPFLBeXgFt\r
+       iTNL9rGB2EICthJHV79ihogLSpyc+YQFoldHYufWO2wgZ4PMWf6PAyIsL9G8dTZYOaeAncTK\r
+       1y/YQWxRoHOmnNzGNoFReBaSSbOQTJqFMGkWkkkLGFlWMcqm5Fbp5iZm5hSnJusWJyfm5aUW\r
+       6Rrp5WaW6KWmlG5iBEUBpyTvDsZ3B5UOMQpwMCrx8E64tSdAiDWxrLgy9xCjJAeTkihvCMu+\r
+       ACG+pPyUyozE4oz4otKc1OJDjBIczEoivAof9gYI8aYkVlalFuXDpKQ5WJTEea+k3PQXEkhP\r
+       LEnNTk0tSC2CycpwcChJ8ApzAg0VLEpNT61Iy8wpQUgzcXCCDOcBGr6NHaiGt7ggMbc4Mx0i\r
+       f4pRUUqc9wwHUEIAJJFRmgfXC0tSrxjFgV4R5mUAWcEDTHBw3a+ABjMBDX4htBtkcEkiQkqq\r
+       gfGo7aYNPkqFdo/dtl7e89Nxh2v0UU6FY64nS898vuBZ/8B1meSmWTU7bTniDvJdlWsVe3SR\r
+       uUhqn1TC2vrVf69V+mSdXWG7t2/xtZ1XpD+26XSUbW95yJOyb82HBL7r5Rmi02aVPAmdXO2f\r
+       2vgj7M5mn2lqQU2psfUrZP7v421j+Hi/b172XE0lluKMREMt5qLiRABEhjoULQMAAA==\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: Tue, 04 Dec 2012 14:35:51 -0000\r
+\r
+I must be missing something...  These both look like whitespace-only\r
+changes, which test_expect_equal_json normalizes.  Did you change\r
+something else, too?\r
+\r
+Quoth Peter Feigl on Dec 04 at  2:46 pm:\r
+> Two --format=json tests were failing, both due changes in the output\r
+> format introduced by the structured formatting code. This patch updates\r
+> the expected output.\r
+> ---\r
+>  test/json | 12 ++----------\r
+>  1 file changed, 2 insertions(+), 10 deletions(-)\r
+> \r
+> diff --git a/test/json b/test/json\r
+> index bfafd55..75b732f 100755\r
+> --- a/test/json\r
+> +++ b/test/json\r
+> @@ -32,7 +32,7 @@ test_expect_equal_json "$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_json "$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>\", \"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_json "$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>\", \"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
+> @@ -50,14 +50,6 @@ test_expect_equal_json "$output" "[[[{\"id\": \"$id\", \"match\": true, \"exclud\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
+>  output=$(notmuch search --format=json "jsön-search-méssage" | notmuch_search_sanitize)\r
+> -test_expect_equal_json "$output" "[{\"thread\": \"XXX\",\r
+> - \"timestamp\": 946728000,\r
+> - \"date_relative\": \"2000-01-01\",\r
+> - \"matched\": 1,\r
+> - \"total\": 1,\r
+> - \"authors\": \"Notmuch Test Suite\",\r
+> - \"subject\": \"json-search-utf8-body-sübjéct\",\r
+> - \"tags\": [\"inbox\",\r
+> - \"unread\"]}]"\r
+> +test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"timestamp\": 946728000, \"date_relative\": \"2000-01-01\", \"matched\": 1, \"total\": 1, \"authors\": \"Notmuch Test Suite\", \"subject\": \"json-search-utf8-body-sübjéct\", \"tags\": [\"inbox\", \"unread\"]}]"\r
+>  \r
+>  test_done\r