X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=test%2FT150-tagging.sh;h=2f0b3531412db146e500eff1ea43235ab53284d2;hb=73b8f0b8d71af395667022395b6d6bb692c3aaf2;hp=0d0a3b874526dccd24166066be3767fbe29efea5;hpb=ab022657776af0bb47e72caf2517464ca59e7d48;p=notmuch diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh index 0d0a3b87..2f0b3531 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 || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 add_message '[subject]=One' add_message '[subject]=Two' @@ -130,6 +130,19 @@ EOF test_expect_equal_file batch_removeall.expected OUTPUT rm batch_removeall.expected +test_begin_subtest "--batch, dependence on previous line" +notmuch dump --format=batch-tag > backup.tags +notmuch tag --batch< OUTPUT +notmuch restore --format=batch-tag < backup.tags +cat <EXPECTED ++inbox +second_tag +tag5 +trigger +unread -- id:msg-001@notmuch-test-suite +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "--batch, blank lines and comments" notmuch dump | sort > EXPECTED notmuch tag --batch <&1 | sed 's/: .*$//' ) -chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.${db_ending} +chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.* test_expect_equal "$output" "A Xapian exception occurred opening database" test_done