diff options
author | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2012-03-10 05:24:51 +0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-03-18 09:14:22 -0300 |
commit | db97cb5b65dc519d2bd02741a6294fdb7dd74459 (patch) | |
tree | c3ae07bda4ab1ad17d21e26ce13a980d060cf568 /test/encoding | |
parent | 6511b08fb81add535b56a183f278b48a45fc9875 (diff) |
test: use subtest name for generated message subject by default
Before the change, messages generated by generate_message() used "Test
message #N" for default subject where N is the generated messages
counter. Since message subject is commonly present in expected
results, there is a chance of breaking other tests when a new
generate_message() call is added. The patch changes default subject
value for generated messages to subtest name if it is available. If
subtest name is not available (i.e. message is generated during test
initialization), the old default value is used (in this case it is
fine to have the counter in the subject).
Another benefit of this change is a sane default value for subject in
generated messages, which would allow to simplify code like:
test_begin_subtest "test for a cool feature"
add_message [subject]="message for test for a cool feature"
Diffstat (limited to 'test/encoding')
-rwxr-xr-x | test/encoding | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/encoding b/test/encoding index 98abf77f..2e1326eb 100755 --- a/test/encoding +++ b/test/encoding @@ -9,7 +9,7 @@ output=$(notmuch show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) test_expect_equal "$output" "message{ id:msg-001@notmuch-test-suite depth:0 match:1 excluded:0 filename:/XXX/mail/msg-001 header{ Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread) -Subject: Test message #1 +Subject: Message with text of unknown charset From: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org> Date: Fri, 05 Jan 2001 15:43:57 +0000 |