X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT240-dump-restore.sh;h=e6976ff8f2788634d202ed63e0960b0fa0cf6227;hb=f76d8f82dd004cf14426a91e8a80dcd2a4b97317;hp=b6d860202df923357c92a1bed982a7bb79198fa7;hpb=de71c4d734bda72eb54b2874935dbd948610ddbe;p=notmuch diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index b6d86020..e6976ff8 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description="\"notmuch dump\" and \"notmuch restore\"" -. ./test-lib.sh +. ./test-lib.sh || exit 1 add_email_corpus @@ -80,6 +80,20 @@ notmuch dump --gzip --output=dump-gzip-outfile.gz gunzip dump-gzip-outfile.gz test_expect_equal_file dump.expected dump-gzip-outfile +test_begin_subtest "restoring gzipped stdin" +notmuch dump --gzip --output=backup.gz +notmuch tag +new_tag '*' +notmuch restore < backup.gz +notmuch dump --output=dump.actual +test_expect_equal_file dump.expected dump.actual + +test_begin_subtest "restoring gzipped file" +notmuch dump --gzip --output=backup.gz +notmuch tag +new_tag '*' +notmuch restore --input=backup.gz +notmuch dump --output=dump.actual +test_expect_equal_file dump.expected dump.actual + # Note, we assume all messages from cworth have a message-id # containing cworth.org