X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT150-tagging.sh;h=a451ffaeb39e3db7529332564b214c8d00f90b8a;hp=45471ac8de72962937761873c81b1f6bcb229609;hb=e311aad182326a1dcb0f8512e10b0e0f0faa9e2c;hpb=ce44657c9e4919b1e4bbbbbe37dbd72257d40736 diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh index 45471ac8..a451ffae 100755 --- a/test/T150-tagging.sh +++ b/test/T150-tagging.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description='"notmuch tag"' -. ./test-lib.sh +. ./test-lib.sh || exit 1 add_message '[subject]=One' add_message '[subject]=Two' @@ -38,6 +38,17 @@ test_expect_equal "$output" "\ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One () thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (tag5 tag6 unread)" +test_begin_subtest "Remove all with batch" +notmuch tag +tag1 One +notmuch tag --remove-all --batch < OUTPUT notmuch restore --format=batch-tag < backup.tags test_expect_equal_file batch.expected OUTPUT +test_begin_subtest "--batch --input --remove-all" +notmuch dump --format=batch-tag > backup.tags +notmuch tag +foo +bar -- One +notmuch tag +tag7 -- Two +notmuch tag --batch --input=batch.in --remove-all +notmuch search \* | notmuch_search_sanitize > OUTPUT +notmuch restore --format=batch-tag < backup.tags +cat > batch_removeall.expected < EXPECTED notmuch tag --batch <&1 | sed 's/: .*$//' ) +chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.${db_ending} +test_expect_equal "$output" "A Xapian exception occurred opening database" + test_done