unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 4/4] test: notmuch tag --remove-all
Date: Tue, 22 Jan 2013 19:41:09 +0200	[thread overview]
Message-ID: <9cc3461ea02253eea1f4afab3f5e77e8fad852a4.1358876448.git.jani@nikula.org> (raw)
In-Reply-To: <1a2c09adc1c963f1aa209c09143f85dca7634e11.1358876448.git.jani@nikula.org>
In-Reply-To: <1a2c09adc1c963f1aa209c09143f85dca7634e11.1358876448.git.jani@nikula.org>

---
 test/tagging |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/test/tagging b/test/tagging
index 1f5632c..dc118f3 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
-- 
1.7.10.4

      parent reply	other threads:[~2013-01-22 17:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22 17:41 [PATCH 1/4] cli: make caller check tag count in parse_tag_command_line Jani Nikula
2013-01-22 17:41 ` [PATCH 2/4] cli: add --remove-all option to "notmuch tag" Jani Nikula
2013-02-25 19:34   ` Jani Nikula
2013-02-25 21:53     ` David Bremner
2013-01-22 17:41 ` [PATCH 3/4] man: document notmuch tag --remove-all Jani Nikula
2013-01-22 17:41 ` Jani Nikula [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cc3461ea02253eea1f4afab3f5e77e8fad852a4.1358876448.git.jani@nikula.org \
    --to=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).