[PATCH 2/4] contrib: pick: test: tag/untag whole thread

Subject: [PATCH 2/4] contrib: pick: test: tag/untag whole thread

Date: Tue, 3 Sep 2013 15:04:58 +0100

To: notmuch@notmuchmail.org

Cc:

From: Mark Walters


---
 contrib/notmuch-pick/test/emacs-pick               |   39 ++++++++++++++
 .../notmuch-pick-tag-inbox-thread-tagged           |   53 ++++++++++++++++++++
 2 files changed, 92 insertions(+), 0 deletions(-)
 create mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-thread-tagged

diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick
index 909f76a..91edcac 100755
--- a/contrib/notmuch-pick/test/emacs-pick
+++ b/contrib/notmuch-pick/test/emacs-pick
@@ -68,6 +68,45 @@ test_begin_subtest "Untag message in notmuch pick view (database)"
 output=$(notmuch search --output=messages 'tag:test_tag')
 test_expect_equal "$output" ""
 
+test_begin_subtest "Tag thread in notmuch pick view"
+test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+	    (require (quote notmuch-pick))
+	    (notmuch-pick "tag:inbox")
+	    (notmuch-test-wait)
+	    ;; move to a sizable thread
+	    (forward-line 26)
+	    (notmuch-pick-tag-thread "+test_thread_tag")
+	    (test-output)
+	    (delete-other-windows)'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox-thread-tagged
+
+test_begin_subtest "Tag message in notmuch pick view (database)"
+output=$(notmuch search --output=messages 'tag:test_thread_tag')
+test_expect_equal "$output" \
+"id:87ocn0qh6d.fsf@yoom.home.cworth.org
+id:20091118005040.GA25380@dottiness.seas.harvard.edu
+id:yunaayketfm.fsf@aiko.keithp.com
+id:87fx8can9z.fsf@vertex.dottedmag
+id:20091117203301.GV3165@dottiness.seas.harvard.edu
+id:87iqd9rn3l.fsf@vertex.dottedmag
+id:20091117190054.GU3165@dottiness.seas.harvard.edu"
+
+test_begin_subtest "Untag thread in notmuch pick view"
+test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+	    (require (quote notmuch-pick))
+	    (notmuch-pick "tag:inbox")
+	    (notmuch-test-wait)
+	    ;; move to the same sizable thread as above
+	    (forward-line 26)
+	    (notmuch-pick-tag-thread "-test_thread_tag")
+	    (test-output)
+	    (delete-other-windows)'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox
+
+test_begin_subtest "Untag message in notmuch pick view (database)"
+output=$(notmuch search --output=messages 'tag:test_thread_tag')
+test_expect_equal "$output" ""
+
 test_begin_subtest "Navigation of notmuch-hello to search results"
 test_emacs '(notmuch-hello)
 	    (goto-char (point-min))
diff --git a/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-thread-tagged b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-thread-tagged
new file mode 100644
index 0000000..a7aba6e
--- /dev/null
+++ b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-thread-tagged
@@ -0,0 +1,53 @@
+  2010-12-29  François Boulogne     ─►[aur-general] Guidelines: cp, mkdir vs install      (inbox, unread)
+  2010-12-16  Olivier Berger        ─►Essai accentué                                      (inbox, unread)
+  2009-11-18  Chris Wilson          ─►[notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once (inbox, unread)
+  2009-11-18  Alex Botero-Lowry     ┬►[notmuch] [PATCH] Error out if no query is supplied to search	instead of going into an infinite loop (attachment, inbox, unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Error out if no query is supplied to search instead of going into an infinite loop (inbox, unread)
+  2009-11-17  Ingmar Vanhassel      ┬►[notmuch] [PATCH] Typsos                            (inbox, unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)
+  2009-11-17  Adrian Perez de Cast  ┬►[notmuch] Introducing myself                        (inbox, signed, unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox, unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)
+  2009-11-17  Israel Herraiz        ┬►[notmuch] New to the list                           (inbox, unread)
+  2009-11-18  Keith Packard         ├─► ...                                               (inbox, unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] What a great idea!                        (inbox, unread)
+  2009-11-17  Jan Janak             ├─► ...                                               (inbox, unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)
+  2009-11-17  Jan Janak             ┬►[notmuch] [PATCH] Older versions of install do not support -C. (inbox, unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, unread)
+  2009-11-17  Aron Griffis          ┬►[notmuch] archive                                   (inbox, unread)
+  2009-11-18  Keith Packard         ╰┬► ...                                               (inbox, unread)
+  2009-11-18  Carl Worth             ╰─► ...                                              (inbox, unread)
+  2009-11-17  Keith Packard         ┬►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove	inbox (and unread) tags (inbox, unread)
+  2009-11-18  Carl Worth            ╰─►[notmuch] [PATCH] Make notmuch-show 'X' (and 'x') commands remove inbox (and unread) tags (inbox, unread)
+  2009-11-17  Lars Kellogg-Stedman  ┬►[notmuch] Working with Maildir storage?             (inbox, signed, test_thread_tag, unread)
+  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox, signed, test_thread_tag, unread)
+  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox, signed, test_thread_tag, unread)
+  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox, test_thread_tag, unread)
+  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox, test_thread_tag, unread)
+  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox, signed, test_thread_tag, unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, test_thread_tag, unread)
+  2009-11-17  Mikhail Gusarov       ┬►[notmuch] [PATCH 1/2] Close message file after parsing message	headers (inbox, unread)
+  2009-11-17  Mikhail Gusarov       ├─►[notmuch] [PATCH 2/2] Include <stdint.h> to get uint32_t in C++	file with gcc 4.4 (inbox, unread)
+  2009-11-17  Carl Worth            ╰┬►[notmuch] [PATCH 1/2] Close message file after parsing message headers (inbox, unread)
+  2009-11-17  Keith Packard          ╰┬► ...                                              (inbox, unread)
+  2009-11-18  Carl Worth              ╰─► ...                                             (inbox, unread)
+  2009-11-18  Keith Packard         ┬►[notmuch] [PATCH] Create a default notmuch-show-hook that	highlights URLs and uses word-wrap (inbox, unread)
+  2009-11-18  Alexander Botero-Low  ╰─►[notmuch] [PATCH] Create a default notmuch-show-hook that highlights URLs and uses word-wrap (inbox, unread)
+  2009-11-18  Alexander Botero-Low  ─►[notmuch] request for pull                          (inbox, unread)
+  2009-11-18  Jjgod Jiang           ┬►[notmuch] Mac OS X/Darwin compatibility issues      (inbox, unread)
+  2009-11-18  Alexander Botero-Low  ╰┬► ...                                               (inbox, unread)
+  2009-11-18  Jjgod Jiang            ╰┬► ...                                              (inbox, unread)
+  2009-11-18  Alexander Botero-Low    ╰─► ...                                             (inbox, unread)
+  2009-11-18  Rolland Santimano     ─►[notmuch] Link to mailing list archives ?           (inbox, unread)
+  2009-11-18  Jan Janak             ─►[notmuch] [PATCH] notmuch new: Support for conversion of spool	subdirectories into tags (inbox, unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] count_files: sort directory in inode order before	statting (inbox, unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH 2/2] Read mail directory in inode number order (inbox, unread)
+  2009-11-18  Stewart Smith         ─►[notmuch] [PATCH] Fix linking with gcc to use g++ to link in C++	libs. (inbox, unread)
+  2009-11-18  Lars Kellogg-Stedman  ┬►[notmuch] "notmuch help" outputs to stderr?         (attachment, inbox, signed, unread)
+  2009-11-18  Lars Kellogg-Stedman  ╰─► ...                                               (attachment, inbox, signed, unread)
+  2009-11-17  Mikhail Gusarov       ─►[notmuch] [PATCH] Handle rename of message file     (inbox, unread)
+  2009-11-17  Alex Botero-Lowry     ┬►[notmuch] preliminary FreeBSD support               (attachment, inbox, unread)
+  2009-11-17  Carl Worth            ╰─► ...                                               (inbox, unread)
+End of search results.
-- 
1.7.9.1


Thread: