unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michal Sojka <sojkam1@fel.cvut.cz>
To: Carl Worth <cworth@cworth.org>,
	Gregor Hoffleit <gregor@hoffleit.de>,
	notmuch <notmuch@notmuchmail.org>
Subject: Re: [PATCH] First tests for JSON output and UTF-8 in mail body and subject
Date: Fri, 16 Apr 2010 10:17:15 +0200	[thread overview]
Message-ID: <87vdbrerqs.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <878w8ofpx9.fsf@yoom.home.cworth.org>

> But you might actually like that change since it's one you requested in
> your first version of the modular test suite. I'm dropping the annoying
> execute_expecting macro that both runs notmuch and tests the
> output. There's now a much cleaner separation such as:
> 
> 	output=$($NOTMUCH search for-something)
> 	pass_if_equal "$output" "something was found"

It's definitely better than before. The current implementation of
pass_if_equal has IMHO one drawback - if it compares multiline text and
there is a difference, it is quite hard to see where.

In my tests for maildir synchronization I use this approach:

  notmuch search tag:inbox | filter_output > actual &&
  diff -u - actual <<EOF
  thread:XXX   2000-01-01 [1/1] Notmuch Test Suite; test message 3 (inbox)
  EOF

Thanks to the usee of diff, I immediately see only the differences.

-Michal

  reply	other threads:[~2010-04-16  8:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04 10:40 [PATCH] json_quote_str should handle non-ASCII characters Gregor Hoffleit
2010-03-04 13:57 ` Sebastian Spaeth
2010-03-04 14:26   ` Gregor Hoffleit
2010-04-13 15:36 ` Carl Worth
2010-04-13 16:37   ` [PATCH] First tests for JSON output and UTF-8 in mail body and subject Gregor Hoffleit
2010-04-15  0:35     ` Carl Worth
2010-04-15  8:33       ` Michal Sojka
2010-04-15 19:58         ` Carl Worth
2010-04-16  8:17           ` Michal Sojka [this message]
2010-04-22 21:14             ` Improved diff-based failure reports from the test suite Carl Worth
2010-04-16 11:49       ` [PATCH] First tests for JSON output and UTF-8 in mail body and subject David Edmondson
2010-04-23  0:15       ` Carl Worth

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=87vdbrerqs.fsf@steelpick.2x.cz \
    --to=sojkam1@fel.cvut.cz \
    --cc=cworth@cworth.org \
    --cc=gregor@hoffleit.de \
    --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).