2 test_description="\"notmuch dump\" and \"notmuch restore\""
5 test_expect_success "Dumping all tags" "generate_message &&
7 notmuch dump dump.expected"
9 test_begin_subtest "Clearing all tags"
10 sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected
11 notmuch restore clear.expected
12 notmuch dump clear.actual
13 test_expect_equal "$(< clear.actual)" "$(< clear.expected)"
15 test_begin_subtest "Restoring original tags"
16 notmuch restore dump.expected
17 notmuch dump dump.actual
18 test_expect_equal "$(< dump.actual)" "$(< dump.expected)"
20 test_expect_success "Restore with nothing to do" "notmuch restore dump.expected"