X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT240-dump-restore.sh;h=efe463ea03dd104ad06995a877e91e39b455a78f;hb=cca05ac10e908c2a8d7fdb3beac59bc085de9702;hp=d79aca86df3297b70763fe7613e47bdf96dcce44;hpb=3c13bc0321baaf340663779d6fce2b1f34c1c2c3;p=notmuch diff --git a/test/T240-dump-restore.sh b/test/T240-dump-restore.sh index d79aca86..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 @@ -110,6 +124,15 @@ notmuch dump --format=batch-tag from:cworth | sed 's/^.*-- id://' | \ sort > OUTPUT.$test_count test_expect_equal_file EXPECTED.$test_count OUTPUT.$test_count +test_begin_subtest "format=batch-tag, missing newline" +printf "+a_tag_without_newline -- id:20091117232137.GA7669@griffis1.net" > IN +notmuch restore --accumulate < IN +notmuch dump id:20091117232137.GA7669@griffis1.net > OUT +cat < EXPECTED ++a_tag_without_newline +inbox +unread -- id:20091117232137.GA7669@griffis1.net +EOF +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