X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Ftagging;h=980ff9274b8228bd2c2559a756cafe1ec1fefaac;hp=77202bf98ff19084312364e655a8fdad6f493125;hb=84a0c529b960e1d305280ba56be3854c0f2679df;hpb=ed20210b6db0b237d48765351cb99b87be7a0509 diff --git a/test/tagging b/test/tagging index 77202bf9..980ff927 100755 --- a/test/tagging +++ b/test/tagging @@ -38,4 +38,16 @@ 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 "Tagging order" +notmuch tag +tag4 -tag4 One +notmuch tag -tag4 +tag4 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 tag4 unread)" + +test_expect_code 1 "Empty tag names" 'notmuch tag + One' + +test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One' + test_done