[Patch v2 06/17] test: add broken roundtrip test

Jani Nikula jani at nikula.org
Fri Nov 30 15:43:31 PST 2012


BTW, patches up to and including this one could go in even if there's
still stuff to do in the following ones.

Jani.


On Sat, 24 Nov 2012, david at tethera.net wrote:
> From: David Bremner <bremner at debian.org>
>
> We demonstrate the current notmuch restore parser being confused by
> message-id's and tags containing non alpha numeric characters
> (particularly space and parentheses are problematic because they are
> not escaped by notmuch dump).
>
> We save the files as hex escaped on disk so that the output from the
> failing test will not confuse the terminal emulator of people running
> the test.
> ---
>  test/dump-restore |    9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/test/dump-restore b/test/dump-restore
> index b05399c..a2204fb 100755
> --- a/test/dump-restore
> +++ b/test/dump-restore
> @@ -85,4 +85,13 @@ test_begin_subtest "dump --output=outfile -- from:cworth"
>  notmuch dump --output=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 --num-messages=10 --config-path=${NOTMUCH_CONFIG} &&
> +     notmuch dump | ${TEST_DIRECTORY}/hex-xcode --direction=encode > EXPECTED.$test_count &&
> +     notmuch tag -random-corpus tag:random-corpus &&
> +     ${TEST_DIRECTORY}/hex-xcode --direction=decode < EXPECTED.$test_count | notmuch restore 2>/dev/null &&
> +     notmuch dump | ${TEST_DIRECTORY}/hex-xcode --direction=encode > OUTPUT.$test_count &&
> +     test_cmp EXPECTED.$test_count OUTPUT.$test_count'
> +
>  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