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"