From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 68437431FAE for ; Tue, 4 Dec 2012 06:35:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VL082vql5Niy for ; Tue, 4 Dec 2012 06:35:45 -0800 (PST) Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU [18.9.25.13]) by olra.theworths.org (Postfix) with ESMTP id 60180431FB6 for ; Tue, 4 Dec 2012 06:35:45 -0800 (PST) X-AuditID: 1209190d-b7f266d00000092b-7f-50be0a40c546 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP id 85.83.02347.04A0EB05; Tue, 4 Dec 2012 09:35:44 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id qB4EZhir009174; Tue, 4 Dec 2012 09:35:44 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qB4EZfVe002533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 4 Dec 2012 09:35:42 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) (envelope-from ) id 1Tftb3-0000LT-Ad; Tue, 04 Dec 2012 09:35:41 -0500 Date: Tue, 4 Dec 2012 09:35:41 -0500 From: Austin Clements To: Peter Feigl Subject: Re: [PATCH 1/1] Fixing failing JSON tests. Message-ID: <20121204143541.GI1020@mit.edu> References: <1354628805-2148-1-git-send-email-craven@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1354628805-2148-1-git-send-email-craven@gmx.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFKsWRmVeSWpSXmKPExsUixG6nruvAtS/A4P0sRYu9De2MFtdvzmR2 YPJYvGk/m8ezVbeYA5iiuGxSUnMyy1KL9O0SuDJmXWlkKvggUfFoX3ID4zfRLkYODgkBE4m9 jw27GDmBTDGJC/fWs3UxcnEICexjlPi5fj07hLOeUWLvpXssEM4FJokj3Z9ZIZwljBKLzrWz gvSzCKhIPHl/gwXEZhPQkNi2fzkjiC0ioCDxbF0TmM0sIC3x7XczE4gtLGAsMWfPFLBeXgFt iTNL9rGB2EICthJHV79ihogLSpyc+YQFoldHYufWO2wgZ4PMWf6PAyIsL9G8dTZYOaeAncTK 1y/YQWxRoHOmnNzGNoFReBaSSbOQTJqFMGkWkkkLGFlWMcqm5Fbp5iZm5hSnJusWJyfm5aUW 6Rrp5WaW6KWmlG5iBEUBpyTvDsZ3B5UOMQpwMCrx8E64tSdAiDWxrLgy9xCjJAeTkihvCMu+ ACG+pPyUyozE4oz4otKc1OJDjBIczEoivAof9gYI8aYkVlalFuXDpKQ5WJTEea+k3PQXEkhP LEnNTk0tSC2CycpwcChJ8ApzAg0VLEpNT61Iy8wpQUgzcXCCDOcBGr6NHaiGt7ggMbc4Mx0i f4pRUUqc9wwHUEIAJJFRmgfXC0tSrxjFgV4R5mUAWcEDTHBw3a+ABjMBDX4htBtkcEkiQkqq gfGo7aYNPkqFdo/dtl7e89Nxh2v0UU6FY64nS898vuBZ/8B1meSmWTU7bTniDvJdlWsVe3SR uUhqn1TC2vrVf69V+mSdXWG7t2/xtZ1XpD+26XSUbW95yJOyb82HBL7r5Rmi02aVPAmdXO2f 2vgj7M5mn2lqQU2psfUrZP7v421j+Hi/b172XE0lluKMREMt5qLiRABEhjoULQMAAA== Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2012 14:35:51 -0000 I must be missing something... These both look like whitespace-only changes, which test_expect_equal_json normalizes. Did you change something else, too? Quoth Peter Feigl on Dec 04 at 2:46 pm: > Two --format=json tests were failing, both due changes in the output > format introduced by the structured formatting code. This patch updates > the expected output. > --- > test/json | 12 ++---------- > 1 file changed, 2 insertions(+), 10 deletions(-) > > diff --git a/test/json b/test/json > index bfafd55..75b732f 100755 > --- a/test/json > +++ b/test/json > @@ -32,7 +32,7 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", > test_begin_subtest "Show message: json, utf-8" > 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\"" > output=$(notmuch show --format=json "jsön-show-méssage") > -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 \", \"To\": \"Notmuch Test Suite \", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]" > +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 \", \"To\": \"Notmuch Test Suite \", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"jsön-show-méssage\n\"}]}, []]]]" > > test_begin_subtest "Show message: json, inline attachment filename" > subject='json-show-inline-attachment-filename' > @@ -50,14 +50,6 @@ test_expect_equal_json "$output" "[[[{\"id\": \"$id\", \"match\": true, \"exclud > test_begin_subtest "Search message: json, utf-8" > 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\"" > output=$(notmuch search --format=json "jsön-search-méssage" | notmuch_search_sanitize) > -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\"]}]" > +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\"]}]" > > test_done