[PATCH v3 1/4] test: add test for both adding and removing a tag at the same time

Jani Nikula jani at nikula.org
Mon Mar 26 14:04:08 PDT 2012


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 <jani at nikula.org>
---
 test/tagging |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/test/tagging b/test/tagging
index 77202bf..3acf1bc 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
-- 
1.7.5.4



More information about the notmuch mailing list