X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT240-dump-restore.sh;h=181def34566beb01677cfb83e7350f035fdaa32f;hb=1f3c7916f82774cacbfbb0fbc9d0e0aaae9399b3;hp=bbfb09b928b0d322bd71cb57736596880299efce;hpb=e042a25a3fd8706b6e1ee7bdf527bb17ecb74c6a;p=notmuch diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index bbfb09b9..181def34 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -2,6 +2,13 @@ test_description="\"notmuch dump\" and \"notmuch restore\"" . ./test-lib.sh || exit 1 +NOTMUCH_NEW > /dev/null +test_begin_subtest "dump header" +cat < EXPECTED +#notmuch-dump batch-tag:2 config,properties,tags +EOF +notmuch dump > OUTPUT +test_expect_equal_file EXPECTED OUTPUT add_email_corpus test_expect_success 'Dumping all tags' \ @@ -135,7 +142,8 @@ test_expect_equal_file EXPECTED OUT test_begin_subtest "format=batch-tag, # round-trip" notmuch dump --format=sup | sort > EXPECTED.$test_count -notmuch dump --format=batch-tag | notmuch restore --format=batch-tag +notmuch dump --format=batch-tag > DUMPFILE +notmuch restore --format=batch-tag < DUMPFILE notmuch dump --format=sup | sort > OUTPUT.$test_count test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count @@ -212,7 +220,8 @@ test_expect_equal_file EXPECTED OUTPUT.$test_count test_begin_subtest 'format=batch-tag, round trip with strange tags' notmuch dump --format=batch-tag > EXPECTED.$test_count -notmuch dump --format=batch-tag | notmuch restore --format=batch-tag +notmuch dump --format=batch-tag > DUMPFILE +notmuch restore --format=batch-tag < DUMPFILE notmuch dump --format=batch-tag > OUTPUT.$test_count test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count