From: Peter Wang <novalazy@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 3/3] test: add test for showing Reply-To headers
Date: Sun, 24 Jun 2012 13:27:50 +1000 [thread overview]
Message-ID: <1340508470-16606-3-git-send-email-novalazy@gmail.com> (raw)
In-Reply-To: <1340508470-16606-1-git-send-email-novalazy@gmail.com>
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" "\
\fmessage{ 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
\fheader}
\fbody{
--
1.7.4.4
next prev parent reply other threads:[~2012-06-24 3:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-24 3:27 [PATCH 1/3] test: add basic show, search --format=text tests Peter Wang
2012-06-24 3:27 ` [PATCH 2/3] show: output Reply-To headers Peter Wang
2012-07-04 1:27 ` Jameson Graef Rollins
2012-07-04 1:59 ` Peter Wang
2012-07-04 2:22 ` Jameson Graef Rollins
2012-07-04 8:24 ` Peter Wang
2012-07-05 8:47 ` Mark Walters
2012-07-05 15:18 ` Austin Clements
2012-06-24 3:27 ` Peter Wang [this message]
2012-07-04 1:24 ` [PATCH 1/3] test: add basic show, search --format=text tests Jameson Graef Rollins
2012-07-04 2:04 ` Austin Clements
2012-07-10 2:12 ` 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=1340508470-16606-3-git-send-email-novalazy@gmail.com \
--to=novalazy@gmail.com \
--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).