aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar David Bremner <david@tethera.net>2014-03-29 15:12:28 -0300
committerGravatar David Bremner <david@tethera.net>2014-04-12 07:59:44 -0300
commit4c62d9366a389b7ddca796009d1dfe6a885cfde0 (patch)
treee05fcb19762d063f401b0dc863fb9e5ccbec74bc /test
parentde71c4d734bda72eb54b2874935dbd948610ddbe (diff)
restore: transparently support gzipped input
We rely completely on zlib to do the right thing in detecting gzipped input. Since our dump format is chosen to be 7 bit ascii, this should be fine.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T240-dump-restore.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh
index b6d86020..efe463ea 100755
--- a/test/T240-dump-restore.sh
+++ b/test/T240-dump-restore.sh
@@ -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