unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: Peter Feigl <craven@gmx.net>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 1/1] Fixing failing JSON tests.
Date: Tue, 4 Dec 2012 09:35:41 -0500	[thread overview]
Message-ID: <20121204143541.GI1020@mit.edu> (raw)
In-Reply-To: <1354628805-2148-1-git-send-email-craven@gmx.net>

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 <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\"}]}, []]]]"
> +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\"}]}, []]]]"
>  
>  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

  reply	other threads:[~2012-12-04 14:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 13:46 [PATCH 1/1] Fixing failing JSON tests Peter Feigl
2012-12-04 14:35 ` Austin Clements [this message]
2012-12-04 14:43   ` Peter Feigl
2012-12-04 15:24     ` [PATCH] test: Fix UTF-8 JSON tests in Python 3 Austin Clements
2012-12-06 21:15       ` Tomi Ollila
2012-12-07 13:14       ` David Bremner
2012-12-08 13:37       ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121204143541.GI1020@mit.edu \
    --to=amdragon@mit.edu \
    --cc=craven@gmx.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).