From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/2] test: show tests
Date: Mon, 19 Mar 2012 15:31:01 +0000 [thread overview]
Message-ID: <1332171061-27983-3-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1332171061-27983-1-git-send-email-markwalters1009@gmail.com>
---
test/notmuch-test | 1 +
test/show | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 0 deletions(-)
create mode 100755 test/show
diff --git a/test/notmuch-test b/test/notmuch-test
index f03b594..2499e4b 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -28,6 +28,7 @@ TESTS="
search-insufficient-from-quoting
search-limiting
tagging
+ show
json
multipart
thread-naming
diff --git a/test/show b/test/show
new file mode 100755
index 0000000..fc83e5e
--- /dev/null
+++ b/test/show
@@ -0,0 +1,47 @@
+#!/usr/bin/env bash
+test_description='"notmuch show" in several variations'
+. ./test-lib.sh
+
+EXPECTED=$TEST_DIRECTORY/show.expected-output
+
+add_email_corpus
+
+thread_query=`notmuch search --output=threads subject:"Working with Maildir storage?"`
+
+test_begin_subtest "Show single thread (text)"
+notmuch show $thread_query >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-text
+
+test_begin_subtest "Show single thread (json)"
+notmuch show --format=json $thread_query | notmuch_json_show_sanitize >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-json
+
+test_begin_subtest "Show single thread (mbox)"
+notmuch show --format=mbox $thread_query >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-mbox
+
+test_begin_subtest "Show single thread with additional query (text)"
+notmuch show $thread_query and from:worth >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-and-query-text
+
+test_begin_subtest "Show single thread with additional query --entire-thread (text)"
+notmuch show --entire-thread $thread_query and from:worth >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-and-query-entire-thread-text
+
+test_begin_subtest "Show single thread with additional query (json)"
+notmuch show --format=json $thread_query and from:worth | notmuch_json_show_sanitize >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-and-query-json
+
+test_begin_subtest "Show single thread with additional query --entire-thread (json)"
+notmuch show --format=json --entire-thread $thread_query and from:worth | notmuch_json_show_sanitize >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-and-query-entire-thread-json
+
+test_begin_subtest "Show single thread with additional query (mbox)"
+notmuch show --format=mbox $thread_query and from:worth >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-and-query-mbox
+
+test_begin_subtest "Show single thread with additional query --entire-thread (mbox)"
+notmuch show --format=mbox --entire-thread $thread_query and from:worth >OUTPUT
+test_expect_equal_file OUTPUT $EXPECTED/single-thread-and-query-entire-thread-mbox
+
+test_done
--
1.7.9.1
next prev parent reply other threads:[~2012-03-19 15:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 15:30 [PATCH 0/2] test: tests for notmuch-show.c Mark Walters
2012-03-19 15:31 ` [PATCH 1/2] test: show expected output files Mark Walters
2012-03-19 15:31 ` Mark Walters [this message]
2012-08-31 21:00 ` [PATCH 2/2] test: show tests 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=1332171061-27983-3-git-send-email-markwalters1009@gmail.com \
--to=markwalters1009@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).