Commit graph

208 commits

Author SHA1 Message Date
Carl Worth
96134fc723 notmuch-test: Add "notmuch reply" test for reply-to support.
This is the standard support of reply-to, (replying to that address
rather than the from address). It has nothing to do with the proposed
feature for extra-clever handling of a mail from a mailing-list that
has munged the reply-to header.
2010-02-04 12:10:43 -08:00
Carl Worth
33f55e43e1 notmuch-test: Test "notmuch reply" from alternate address.
When reply to a message addresses to an address configured in the
other_email setting in the configuration file, the reply should use
that address in the From header. Test this.
2010-02-04 12:10:43 -08:00
Carl Worth
4e66b777cf notmuch-test: Add a basic test of "notmuch reply"
Simply ensuring that the reply template is formatted as expected.
2010-02-04 12:10:42 -08:00
Carl Worth
5a4532860c notmuch-test: Eliminate sleeps to speed up test suite run
We were sleeping merely to ensure that our updates to the mail store
would result in the mtime of the appropriate directories being
updated. We make the test suite run faster by not sleeping, but
instead explicitly updating the mtime of the directory to a future
time with touch.

We're careful to ensure that the time is not merely in the future
compared to the current time, but also later than any previous update
to the same directory mtime.
2010-02-04 12:10:42 -08:00
Carl Worth
a821ba5737 notmuch-test: Allow custom headers when generating messages
This provides the control that future tests will need, (for example,
adding a CC field to ensure proper handling with "notmuch reply",
etc.)
2010-02-04 08:44:05 -08:00
Carl Worth
0d67c52f4d notmuch-test: Use named-parameters for generate_message function
This makes the test suite bash-specific, but that's not much of
an issue for me, (if somebody else would prefer some other language
then they can rewrite the test suite and maintain it).

The advantage here is that we'll now be able to easily generate
custom messages for testing operations that depend on the message
content, (such as "notmuch reply", etc.).
2010-02-04 08:44:05 -08:00
Carl Worth
8d37b2f982 Add actual testing to notmuch-test
We verify that each command creates output exactly as expected (after
ignoring variable output such as the report of how long an operation
took).
2010-02-04 08:44:05 -08:00
Carl Worth
a2d919eb2f Add a very rough beginning of a test suite.
This notmuch-test script simply runs a few different notmuch operations,
(things that I found were useful while testing the rename-support code).

It's not useful as a test suite yet, since it doesn't actually check
the results of any operation, (the user of the suite has to know what
the results should be and must manually verify them. So there's no
integration with the build system yet, (no "make test" target).

But I didn't want to lose what I had so far, so here it is.
2010-01-24 07:36:39 +13:00