From 918b80359727de2dd87f26a252de8faee2eff78c Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 27 Mar 2012 00:04:08 +0300 Subject: [PATCH] test: add test for both adding and removing a tag at the same time The current behaviour is that regardless of the order in which the addition and removal of a tag are specified, the tag is added. Signed-off-by: Jani Nikula --- test/tagging | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/tagging b/test/tagging index 77202bf9..3acf1bc0 100755 --- a/test/tagging +++ b/test/tagging @@ -38,4 +38,12 @@ 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 tag4 unread) +thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)" + test_done -- 2.26.2