]> git.notmuchmail.org Git - notmuch/blob - test/dump-restore
Render all parts of multipart/encrypted when decrypting.
[notmuch] / test / dump-restore
1 #!/usr/bin/env bash
2 test_description="\"notmuch dump\" and \"notmuch restore\""
3 . ./test-lib.sh
4
5 add_email_corpus
6
7 test_expect_success "Dumping all tags" "generate_message &&
8 notmuch new &&
9 notmuch dump dump.expected"
10
11 test_begin_subtest "Clearing all tags"
12 sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected
13 notmuch restore clear.expected
14 notmuch dump clear.actual
15 test_expect_equal "$(< clear.actual)" "$(< clear.expected)"
16
17 test_begin_subtest "Restoring original tags"
18 notmuch restore dump.expected
19 notmuch dump dump.actual
20 test_expect_equal "$(< dump.actual)" "$(< dump.expected)"
21
22 test_expect_success "Restore with nothing to do" "notmuch restore dump.expected"
23
24 test_done