From: Carl Worth <cworth@cworth.org>
To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org
Subject: Re: A functional (but rudimentary) test suite for notmuch
Date: Thu, 11 Feb 2010 13:42:08 -0800 [thread overview]
Message-ID: <871vgr78lr.fsf@yoom.home.cworth.org> (raw)
In-Reply-To: <201002081614.24284.sojkam1@fel.cvut.cz>
[-- Attachment #1: Type: text/plain, Size: 2581 bytes --]
Hi Michal,
I found myself today *really* needing to add a test that exercises some
code in our emacs client. (Eric found that a message that includes a ":"
in the From: address breaks things due to a buggy regexp.) And I
wanted to see if I could merge your conversion of the test suite before
I added a feature as big as that. See below for my feedback.
-Carl
On Mon, 8 Feb 2010 16:14:24 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
> I converted the actual version of notmuch-test to git test framework.
> The result is in the followup patches.
Interesting. My only real concern at this point is that some of the new files
have a copyright header identifying Junio as the copyright holder, but
no license information. Meanwhile, the implicit license of git (GPLv2
only) is incompatible with that of notmuch (GPLv3+).
So if you'd like to ask Junio for permission to re-use the files under
the GPLv3+ then we could see what he says.
In the meantime, you've done some nice modularization work here which we
should be able to take right away, (and I can write tiny implementations
of the functions we need so that we can just drop in git's test-lib.sh
if we get permission).
So we won't yet have any of the fancy features of the framework,
(expected failures, reports of fixed tests, pre-requisites for tests),
but we're not *using* any of those features yet so it shouldn't matter.
> The conversion was not as straightforward as I expected mainly because
> of problems with quoting. There are several sources of quotation problems
> one being Carl's hashed array parameters. I thing it would be
> sufficient to use plain variables for passing additional parameters.
> Instead of:
> add_message [from]="\"Sender <sender@example.com>\"" \
> [to]=test_suite@notmuchmail.org \
...
> I'd do:
> msg_from="Sender <sender@example.com>"
> msg_to=test_suite@notmuchmail.org
> add_message
Yeah. I almost wrote it that way, but named parameters (even if faked)
seemed so much nicer. I'll agree that the quoting was quite nasty
though.
> A possible additional improvement is elimination of
> execute_expecting(). Combination of action (running notmuch) and
> testing of a result in a single function makes it hard to distinguish
> whether the problem is in the action or in the output.
A fair point. It also caused problems when I wanted to do tests that
didn't directly test the output of notmuch, (such as a test that uses
diff to compare a result against the contents in a file).
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2010-02-11 21:42 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 20:50 A functional (but rudimentary) test suite for notmuch Carl Worth
2010-02-04 21:27 ` Oliver Charles
2010-02-04 23:29 ` Carl Worth
2010-02-06 15:27 ` Oliver Charles
2010-02-08 15:14 ` Michal Sojka
2010-02-08 15:16 ` [PATCH 1/3] Copy test framework from Git Michal Sojka
2010-02-08 15:16 ` [PATCH 2/3] Update test framework for use with notmuch Michal Sojka
2010-02-08 15:16 ` [PATCH 3/3] Convert the actual tests to the new framework Michal Sojka
2010-02-11 21:42 ` Carl Worth [this message]
2010-02-12 14:47 ` A functional (but rudimentary) test suite for notmuch Michal Sojka
2010-02-12 16:33 ` Carl Worth
2010-02-15 8:39 ` Using test-lib.sh under GPLv3? Michal Sojka
2010-02-16 10:27 ` Jakub Narebski
2010-02-16 13:06 ` Michal Sojka
2010-02-16 22:07 ` Avery Pennarun
2010-02-17 0:26 ` Jakub Narebski
2010-02-16 20:54 ` Junio C Hamano
2010-02-19 8:19 ` Michal Sojka
2010-02-19 8:44 ` Sverre Rabbelier
2010-02-19 10:39 ` Johannes Schindelin
2010-02-19 17:15 ` Pierre Habouzit
2010-02-19 19:01 ` Carl Worth
2010-02-19 21:04 ` Johannes Schindelin
2010-02-20 19:55 ` [PATCH] test-lib.sh: Add explicit license detail, with change from GPLv2 to GPLv2+ Carl Worth
2010-02-20 21:28 ` Junio C Hamano
2010-02-22 19:26 ` Carl Worth
2010-02-23 3:42 ` Junio C Hamano
2010-02-23 3:51 ` Tay Ray Chuan
2010-02-23 9:21 ` Johannes Schindelin
2010-02-23 6:48 ` Matthieu Moy
2010-02-23 18:23 ` Carl Worth
2010-02-20 21:49 ` Tay Ray Chuan
2010-02-20 22:22 ` Johannes Schindelin
2010-04-06 17:01 ` Michal Sojka
2010-04-15 18:08 ` Carl Worth
2010-02-19 17:36 ` Using test-lib.sh under GPLv3? Johannes Sixt
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=871vgr78lr.fsf@yoom.home.cworth.org \
--to=cworth@cworth.org \
--cc=notmuch@notmuchmail.org \
--cc=sojkam1@fel.cvut.cz \
/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).