From 8e3ff8fb03dc647f1daea4665c35a2214473ced8 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 27 Mar 2012 00:04:09 +0300 Subject: cli: refactor "notmuch tag" data structures for tagging operations To simplify code, keep all tagging operations in a single array instead of separate add and remove arrays. Apply tag changes in the order specified on the command line, instead of first removing and then adding the tags. This results in a minor functional change: If a tag is both added and removed, the last specified operation is now used. Previously the tag was always added. Change the relevant test to reflect the new behaviour. Signed-off-by: Jani Nikula --- test/tagging | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/tagging b/test/tagging index 3acf1bc0..e4782ed4 100755 --- a/test/tagging +++ b/test/tagging @@ -43,7 +43,7 @@ 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; One (:\" inbox tag1 unread) thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)" test_done -- cgit v1.2.3