unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH v2 1/2] test: remove "Generate some messages" test from raw
Date: Sat, 10 Mar 2012 05:24:50 +0400	[thread overview]
Message-ID: <1331342691-26899-2-git-send-email-dmitry.kurochkin@gmail.com> (raw)
In-Reply-To: <1331342691-26899-1-git-send-email-dmitry.kurochkin@gmail.com>

Before the change, the first subtest in raw format tests just
generated messages and checked that they are added successfully.  This
is not really a raw format test, it is creating of environment
required for other subtests to run.  The patch removes the first
subtest from raw and replaces it with bare add_message calls, similar
to how it is done in other tests.

TODO: we should check that test environment was created successfully.
Currently, many tests do add_message(), notmuch new and other calls
without checking the results.  We should come up with a general
solution for this, i.e. if any command during test initialization
fails, all tests should be skipped with appropriate error message.
---
 test/raw |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/test/raw b/test/raw
index 0171e64..de0b867 100755
--- a/test/raw
+++ b/test/raw
@@ -3,11 +3,8 @@
 test_description='notmuch show --format=raw'
 . ./test-lib.sh
 
-test_begin_subtest "Generate some messages"
-generate_message
-generate_message
-output=$(NOTMUCH_NEW)
-test_expect_equal "$output" "Added 2 new messages to the database."
+add_message
+add_message
 
 test_begin_subtest "Attempt to show multiple raw messages"
 output=$(notmuch show --format=raw "*" 2>&1)
-- 
1.7.9.1

  reply	other threads:[~2012-03-10  1:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 22:06 [PATCH 1/2] test: remove "Generate some messages" test from raw Dmitry Kurochkin
2012-01-30 22:06 ` [PATCH 2/2] test: use subtest name for generated message subject by default Dmitry Kurochkin
2012-03-09  8:24   ` Jani Nikula
2012-02-15 18:33 ` [PATCH 1/2] test: remove "Generate some messages" test from raw Dmitry Kurochkin
2012-03-01 23:09   ` Dmitry Kurochkin
2012-03-10  1:24 ` [PATCH v2 0/2] test: use subtest name for generated message subject Dmitry Kurochkin
2012-03-10  1:24   ` Dmitry Kurochkin [this message]
2012-03-10  1:24   ` [PATCH v2 2/2] test: use subtest name for generated message subject by default Dmitry Kurochkin
2012-03-18 12:50   ` [PATCH v2 0/2] test: use subtest name for generated message subject 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=1331342691-26899-2-git-send-email-dmitry.kurochkin@gmail.com \
    --to=dmitry.kurochkin@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).