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

Mark Walters markwalters1009 at gmail.com
Wed Aug 8 01:06:59 PDT 2012


On Sun, 05 Aug 2012, david at tethera.net wrote:
> From: David Bremner <bremner at debian.org>
>
> The output of test_cmp is redirected because it is pretty horrible,
> and tends to mess up terminals. When the test is no longer marked as
> broken, this redirection should be removed.

How about piping the output to hexdump or even cat -v or something?

> ---
>  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.

Best wishes 

Mark

> +
>  test_done
> -- 
> 1.7.10.4
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list