Test that show --format=text and --format=json now output Reply-To headers when present. --- test/json | 4 ++-- test/text | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/json b/test/json index 6439788..0a692ac 100755 --- a/test/json +++ b/test/json @@ -3,9 +3,9 @@ test_description="--format=json output" . ./test-lib.sh test_begin_subtest "Show message: json" -add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\"" +add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-show-message\"" "[reply-to]=\"json-show-reply-to\"" output=$(notmuch show --format=json "json-show-message") -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>\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]" +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>\", \"Reply-To\": \"json-show-reply-to\", \"Date\": \"Sat, 01 Jan 2000 12:00:00 +0000\"}, \"body\": [{\"id\": 1, \"content-type\": \"text/plain\", \"content\": \"json-show-message\n\"}]}, []]]]" test_begin_subtest "Search message: json" add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"json-search-message\"" diff --git a/test/text b/test/text index 428c89b..bf1dfd1 100755 --- a/test/text +++ b/test/text @@ -3,7 +3,7 @@ test_description="--format=text output" . ./test-lib.sh test_begin_subtest "Show message: text" -add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\"" +add_message "[subject]=\"text-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"text-show-message\"" "[reply-to]=\"text-show-reply-to\"" output=$(notmuch show --format=text "text-show-message" | notmuch_show_sanitize_all) test_expect_equal "$output" "\ message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX @@ -12,6 +12,7 @@ Notmuch Test Suite <test_suite@notmuchmail.org> (2000-01-01) (inbox unread) Subject: text-show-subject From: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org> +Reply-To: text-show-reply-to Date: Sat, 01 Jan 2000 12:00:00 +0000 header} body{ -- 1.7.4.4