X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Ftagging;h=dc118f331ff054ac53476a7221e1d9f42a35d987;hp=1f5632cb3da838dbcae52658301c53efc097bd2f;hb=84719b08f757a6079f4c3331d0c476d19b265948;hpb=bd829fde9640cf23482b3f1dfe2007ef38f2b24a diff --git a/test/tagging b/test/tagging index 1f5632cb..dc118f33 100755 --- a/test/tagging +++ b/test/tagging @@ -30,6 +30,22 @@ test_expect_equal "$output" "\ thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread) thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 unread)" +test_begin_subtest "Remove all" +notmuch tag --remove-all One +notmuch tag --remove-all +tag5 +tag6 +unread Two +output=$(notmuch search \* | notmuch_search_sanitize) +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 a no-op" +notmuch tag +inbox +tag1 +unread One +notmuch tag --remove-all +foo +inbox +tag1 -foo +unread Two +output=$(notmuch search \* | notmuch_search_sanitize) +test_expect_equal "$output" "\ +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread) +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 unread)" + test_begin_subtest "Special characters in tags" notmuch tag +':" ' \* notmuch tag -':" ' Two