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 at
notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite at
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 at
notmuchmail.org>\", \"To\": \"Notmuch Test Suite <test_suite at
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
--
1.8.0