[PATCH v3 05/10] test: add test for dump --format=notmuch
From: David BremnerThe first test is really to test our assumptions about the corpus, namely that a certain set of message-id's is safe (i.e. doesn't change under hex-escaping). We then check dump output as best we can without functionality-to-come in notmuch-restore. --- test/dump-restore | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index 439e998..0e210d3 100755 --- a/test/dump-restore +++ b/test/dump-restore @@ -82,4 +82,16 @@ 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_begin_subtest "Check for a safe set of message-ids" +notmuch search --output=messages from:cworth > EXPECTED.$test_count +notmuch search --output=messages from:cworth |\ + $TEST_DIRECTORY/hex-xcode --direction=encode > OUTPUT.$test_count +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count + +# we have observed that cworth has sane message-ids, and hopefully sane tags. +test_begin_subtest "dump --format=notmuch -- from:cworth" +notmuch dump --format=sup -- from:cworth | tr -d \(\) > EXPECTED.$test_count +notmuch dump --format=notmuch -- from:cworth > OUTPUT.$test_count +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count + test_done -- 1.7.7.3
[PATCH v3 05/10] test: add test for dump --format=notmuch
From: David Bremner brem...@debian.org The first test is really to test our assumptions about the corpus, namely that a certain set of message-id's is safe (i.e. doesn't change under hex-escaping). We then check dump output as best we can without functionality-to-come in notmuch-restore. --- test/dump-restore | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index 439e998..0e210d3 100755 --- a/test/dump-restore +++ b/test/dump-restore @@ -82,4 +82,16 @@ 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_begin_subtest Check for a safe set of message-ids +notmuch search --output=messages from:cworth EXPECTED.$test_count +notmuch search --output=messages from:cworth |\ + $TEST_DIRECTORY/hex-xcode --direction=encode OUTPUT.$test_count +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count + +# we have observed that cworth has sane message-ids, and hopefully sane tags. +test_begin_subtest dump --format=notmuch -- from:cworth +notmuch dump --format=sup -- from:cworth | tr -d \(\) EXPECTED.$test_count +notmuch dump --format=notmuch -- from:cworth OUTPUT.$test_count +test_expect_equal_file OUTPUT.$test_count EXPECTED.$test_count + test_done -- 1.7.7.3 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch