diff options
author | David Bremner <david@tethera.net> | 2014-03-28 22:14:51 -0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-04-12 07:59:44 -0300 |
commit | 3c13bc0321baaf340663779d6fce2b1f34c1c2c3 (patch) | |
tree | 482e64a162df828622440c1818bf58624bff2435 /test | |
parent | 69867c33fa946514e9de6efff0541762b2755484 (diff) |
dump: support gzipped and atomic output
The main goal is to support gzipped output for future internal
calls (e.g. from notmuch-new) to notmuch_database_dump.
The additional dependency is not very heavy since xapian already pulls
in zlib.
We want the dump to be "atomic", in the sense that after running the
dump file is either present and complete, or not present. This avoids
certain classes of mishaps involving overwriting a good backup with a
bad or partial one.
Diffstat (limited to 'test')
-rwxr-xr-x | test/T240-dump-restore.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index 0004438d..d79aca86 100755 --- a/test/T240-dump-restore.sh +++ b/test/T240-dump-restore.sh @@ -68,6 +68,18 @@ test_begin_subtest "dump --output=outfile --" notmuch dump --output=dump-1-arg-dash.actual -- test_expect_equal_file dump.expected dump-1-arg-dash.actual +# gzipped output + +test_begin_subtest "dump --gzip" +notmuch dump --gzip > dump-gzip.gz +gunzip dump-gzip.gz +test_expect_equal_file dump.expected dump-gzip + +test_begin_subtest "dump --gzip --output=outfile" +notmuch dump --gzip --output=dump-gzip-outfile.gz +gunzip dump-gzip-outfile.gz +test_expect_equal_file dump.expected dump-gzip-outfile + # Note, we assume all messages from cworth have a message-id # containing cworth.org |