[PATCH 3/3] test: add broken roundtrip test

Jameson Graef Rollins jrollins at finestructure.net
Wed Aug 8 09:33:30 PDT 2012


On Wed, Aug 08 2012, Mark Walters <markwalters1009 at gmail.com> wrote:
>>  test/dump-restore |    9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/test/dump-restore b/test/dump-restore
>> index 439e998..7979ebf 100755
>> --- a/test/dump-restore
>> +++ b/test/dump-restore
>> @@ -82,4 +82,13 @@ test_begin_subtest "dump outfile -- from:cworth"
>>  notmuch dump dump-outfile-dash-inbox.actual -- from:cworth
>>  test_expect_equal_file dump-cworth.expected dump-outfile-dash-inbox.actual
>>  
>> +test_expect_success 'roundtripping random message-ids and tags' \
>> +    'test_subtest_known_broken &&
>> +    ${TEST_DIRECTORY}/random-corpus --config-path=${NOTMUCH_CONFIG} &&
>> +    notmuch dump > EXPECTED.$test_count &&
>> +    notmuch tag -random-corpus tag:random-corpus &&
>> +    notmuch restore < EXPECTED.$test_count 2>/dev/null &&
>> +    notmuch dump > OUTPUT.$test_count &&
>> +    test_cmp EXPECTED.$test_count OUTPUT.$test_count 1>/dev/null'
>
> Are the single quotes at the start and end of the main block meant to be
> there? And with them deleted this seems to pass (but there is lots of
> diff if the redirection is removed).  I am not familiar with
> test_expect_success/test_cmp so don't know what to expect.

I don't understand what's going on here either.  This seems like a
strange way to run these tests, as a command string to
test_expect_success.  Why not just run them directly?

I'm also worried about the test output blowing away the users terminal.
I think that should be avoided, even if we expect failures to be rare.

jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120808/8d637917/attachment.pgp>


More information about the notmuch mailing list