]> git.notmuchmail.org Git - notmuch/blobdiff - test/T150-tagging.sh
test: add known broken test for error handling on closed database
[notmuch] / test / T150-tagging.sh
index 0d0a3b874526dccd24166066be3767fbe29efea5..208b4b9806405e5c4e90b8d7f1af56afe6a4e412 100755 (executable)
@@ -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<<EOF
++trigger -- One
++second_tag -- tag:trigger
+EOF
+NOTMUCH_DUMP_TAGS tag:second_tag > OUTPUT
+notmuch restore --format=batch-tag < backup.tags
+cat <<EOF >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 <<EOF