X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT150-tagging.sh;h=208b4b9806405e5c4e90b8d7f1af56afe6a4e412;hp=61d1311608a755c5815bf545ff46170036339fa5;hb=2c17327ee5c428e3d52a188b0433a130b4684438;hpb=07dff496304d6dc2e8033a18691b095ed9cd212f diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh index 61d13116..208b4b98 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' @@ -19,8 +19,11 @@ test_expect_equal "$output" "\ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag3 unread) thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag3 unread)" -test_expect_code 1 "No tag operations" 'notmuch tag One' -test_expect_code 1 "No query" 'notmuch tag +tag2' +test_begin_subtest "No tag operations" +test_expect_code 1 'notmuch tag One' + +test_begin_subtest "No query" +test_expect_code 1 'notmuch tag +tag2' test_begin_subtest "Redundant tagging" notmuch tag +tag1 -tag3 One @@ -127,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 <