mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-27 13:17:56 +01:00
5497b01c27
We do this with a new add_email_corpus function that establishes a mail store with 50 messages from the notmuch mailing list.
24 lines
680 B
Bash
Executable file
24 lines
680 B
Bash
Executable file
#!/bin/bash
|
|
test_description="\"notmuch dump\" and \"notmuch restore\""
|
|
. ./test-lib.sh
|
|
|
|
add_email_corpus
|
|
|
|
test_expect_success "Dumping all tags" "generate_message &&
|
|
notmuch new &&
|
|
notmuch dump dump.expected"
|
|
|
|
test_begin_subtest "Clearing all tags"
|
|
sed -e "s/(\([^(]*\))$/()/" < dump.expected > clear.expected
|
|
notmuch restore clear.expected
|
|
notmuch dump clear.actual
|
|
test_expect_equal "$(< clear.actual)" "$(< clear.expected)"
|
|
|
|
test_begin_subtest "Restoring original tags"
|
|
notmuch restore dump.expected
|
|
notmuch dump dump.actual
|
|
test_expect_equal "$(< dump.actual)" "$(< dump.expected)"
|
|
|
|
test_expect_success "Restore with nothing to do" "notmuch restore dump.expected"
|
|
|
|
test_done
|