unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/4] contrib: pick: extra tests 
@ 2013-09-03 14:04 Mark Walters
  2013-09-03 14:04 ` [PATCH 1/4] contrib: pick: test: tag/untag single message Mark Walters
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Mark Walters @ 2013-09-03 14:04 UTC (permalink / raw)
  To: notmuch

This series adds some tests for various existing and recently added
functionality.

The only thing to note is that the xapian tag database and the
displayed tags are update separately so we need to test both.

Best wishes

Mark    

Mark Walters (4):
  contrib: pick: test: tag/untag single message
  contrib: pick: test: tag/untag whole thread
  contrib: pick: test: stash message id
  contrib: pick: test: buffer movement

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

-- 
1.7.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/4] contrib: pick: test: tag/untag single message
  2013-09-03 14:04 [PATCH 0/4] contrib: pick: extra tests Mark Walters
@ 2013-09-03 14:04 ` Mark Walters
  2013-09-03 14:04 ` [PATCH 2/4] contrib: pick: test: tag/untag whole thread Mark Walters
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mark Walters @ 2013-09-03 14:04 UTC (permalink / raw)
  To: notmuch

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

diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick
index 37f974a..909f76a 100755
--- a/contrib/notmuch-pick/test/emacs-pick
+++ b/contrib/notmuch-pick/test/emacs-pick
@@ -34,6 +34,40 @@ test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
 	    (delete-other-windows)'
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox
 
+# In the following tag tests we make sure the display is updated
+# correctly and, in a separate test, that the database is updated
+# correctly.
+
+test_begin_subtest "Tag message in notmuch pick view (display)"
+test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+	    (require (quote notmuch-pick))
+	    (notmuch-pick "tag:inbox")
+	    (notmuch-test-wait)
+	    (forward-line)
+	    (notmuch-pick-tag "+test_tag")
+	    (test-output)
+	    (delete-other-windows)'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox-tagged
+
+test_begin_subtest "Tag message in notmuch pick view (database)"
+output=$(notmuch search --output=messages 'tag:test_tag')
+test_expect_equal "$output" "id:877h1wv7mg.fsf@inf-8657.int-evry.fr"
+
+test_begin_subtest "Untag message 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)
+	    (forward-line)
+	    (notmuch-pick-tag "-test_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_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-tagged b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-tagged
new file mode 100644
index 0000000..1f75a34
--- /dev/null
+++ b/contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-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, test_tag, 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, unread)
+  2009-11-17  Mikhail Gusarov       ├┬► ...                                               (inbox, signed, unread)
+  2009-11-17  Lars Kellogg-Stedman  │╰┬► ...                                              (inbox, signed, unread)
+  2009-11-17  Mikhail Gusarov       │ ├─► ...                                             (inbox, unread)
+  2009-11-17  Keith Packard         │ ╰┬► ...                                             (inbox, unread)
+  2009-11-18  Lars Kellogg-Stedman  │  ╰─► ...                                            (inbox, signed, unread)
+  2009-11-18  Carl Worth            ╰─► ...                                               (inbox, 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] contrib: pick: test: tag/untag whole thread
  2013-09-03 14:04 [PATCH 0/4] contrib: pick: extra tests Mark Walters
  2013-09-03 14:04 ` [PATCH 1/4] contrib: pick: test: tag/untag single message Mark Walters
@ 2013-09-03 14:04 ` Mark Walters
  2013-09-03 14:04 ` [PATCH 3/4] contrib: pick: test: stash message id Mark Walters
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mark Walters @ 2013-09-03 14:04 UTC (permalink / raw)
  To: notmuch

---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] contrib: pick: test: stash message id
  2013-09-03 14:04 [PATCH 0/4] contrib: pick: extra tests Mark Walters
  2013-09-03 14:04 ` [PATCH 1/4] contrib: pick: test: tag/untag single message Mark Walters
  2013-09-03 14:04 ` [PATCH 2/4] contrib: pick: test: tag/untag whole thread Mark Walters
@ 2013-09-03 14:04 ` Mark Walters
  2013-09-03 14:05 ` [PATCH 4/4] contrib: pick: test: buffer movement Mark Walters
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Mark Walters @ 2013-09-03 14:04 UTC (permalink / raw)
  To: notmuch

This is important to test as lots of subsequent tests will fail if this fails.
---
 contrib/notmuch-pick/test/emacs-pick |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick
index 91edcac..6834998 100755
--- a/contrib/notmuch-pick/test/emacs-pick
+++ b/contrib/notmuch-pick/test/emacs-pick
@@ -159,4 +159,12 @@ test_emacs '(notmuch-hello)
 cp OUTPUT /tmp/mjwout
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-show-window
 
+test_begin_subtest "Stash id"
+output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+		     (require (quote notmuch-pick))
+		     (notmuch-pick "id:1258498485-sup-142@elly")
+		     (notmuch-test-wait)
+		     (notmuch-show-stash-message-id)')
+test_expect_equal "$output" "\"Stashed: id:1258498485-sup-142@elly\""
+
 test_done
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] contrib: pick: test: buffer movement
  2013-09-03 14:04 [PATCH 0/4] contrib: pick: extra tests Mark Walters
                   ` (2 preceding siblings ...)
  2013-09-03 14:04 ` [PATCH 3/4] contrib: pick: test: stash message id Mark Walters
@ 2013-09-03 14:05 ` Mark Walters
  2013-09-03 15:07 ` [PATCH 0/4] contrib: pick: extra tests Tomi Ollila
  2013-09-04  9:37 ` David Bremner
  5 siblings, 0 replies; 7+ messages in thread
From: Mark Walters @ 2013-09-03 14:05 UTC (permalink / raw)
  To: notmuch

---
 contrib/notmuch-pick/test/emacs-pick |   40 ++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick
index 6834998..a802d0e 100755
--- a/contrib/notmuch-pick/test/emacs-pick
+++ b/contrib/notmuch-pick/test/emacs-pick
@@ -167,4 +167,44 @@ output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
 		     (notmuch-show-stash-message-id)')
 test_expect_equal "$output" "\"Stashed: id:1258498485-sup-142@elly\""
 
+test_begin_subtest "Move to next matching message"
+output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+		     (require (quote notmuch-pick))
+		     (notmuch-pick "from:cworth")
+		     (notmuch-test-wait)
+		     (notmuch-pick-next-matching-message)
+		     (notmuch-show-stash-message-id)')
+test_expect_equal "$output" "\"Stashed: id:878we4qdqf.fsf@yoom.home.cworth.org\""
+
+test_begin_subtest "Move to next thread"
+output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+		     (require (quote notmuch-pick))
+		     (notmuch-pick "tag:inbox")
+		     (notmuch-test-wait)
+		     (forward-line 26)
+		     (notmuch-pick-next-thread)
+		     (notmuch-show-stash-message-id)')
+test_expect_equal "$output" "\"Stashed: id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net\""
+
+test_begin_subtest "Move to previous thread"
+output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+		     (require (quote notmuch-pick))
+		     (notmuch-pick "tag:inbox")
+		     (notmuch-test-wait)
+		     (forward-line 26)
+		     (notmuch-pick-prev-thread)
+		     (notmuch-show-stash-message-id)')
+test_expect_equal "$output" "\"Stashed: id:20091117190054.GU3165@dottiness.seas.harvard.edu\""
+
+test_begin_subtest "Move to previous previous thread"
+output=$(test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
+		     (require (quote notmuch-pick))
+		     (notmuch-pick "tag:inbox")
+		     (notmuch-test-wait)
+		     (forward-line 26)
+		     (notmuch-pick-prev-thread)
+		     (notmuch-pick-prev-thread)
+		     (notmuch-show-stash-message-id)')
+test_expect_equal "$output" "\"Stashed: id:1258493565-13508-1-git-send-email-keithp@keithp.com\""
+
 test_done
-- 
1.7.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] contrib: pick: extra tests
  2013-09-03 14:04 [PATCH 0/4] contrib: pick: extra tests Mark Walters
                   ` (3 preceding siblings ...)
  2013-09-03 14:05 ` [PATCH 4/4] contrib: pick: test: buffer movement Mark Walters
@ 2013-09-03 15:07 ` Tomi Ollila
  2013-09-04  9:37 ` David Bremner
  5 siblings, 0 replies; 7+ messages in thread
From: Tomi Ollila @ 2013-09-03 15:07 UTC (permalink / raw)
  To: Mark Walters, notmuch

On Tue, Sep 03 2013, Mark Walters <markwalters1009@gmail.com> wrote:

> This series adds some tests for various existing and recently added
> functionality.
>
> The only thing to note is that the xapian tag database and the
> displayed tags are update separately so we need to test both.

Looks good (afaiu), tests pass

> Best wishes
>
> Mark

Tomi

>
> Mark Walters (4):
>   contrib: pick: test: tag/untag single message
>   contrib: pick: test: tag/untag whole thread
>   contrib: pick: test: stash message id
>   contrib: pick: test: buffer movement
>
>  contrib/notmuch-pick/test/emacs-pick               |  121 ++++++++++++++++++++
>  .../notmuch-pick-tag-inbox-tagged                  |   53 +++++++++
>  .../notmuch-pick-tag-inbox-thread-tagged           |   53 +++++++++
>  3 files changed, 227 insertions(+), 0 deletions(-)
>  create mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-tagged
>  create mode 100644 contrib/notmuch-pick/test/pick.expected-output/notmuch-pick-tag-inbox-thread-tagged
>
> -- 
> 1.7.9.1
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
>

-- 
"kaik on mänt!"

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/4] contrib: pick: extra tests
  2013-09-03 14:04 [PATCH 0/4] contrib: pick: extra tests Mark Walters
                   ` (4 preceding siblings ...)
  2013-09-03 15:07 ` [PATCH 0/4] contrib: pick: extra tests Tomi Ollila
@ 2013-09-04  9:37 ` David Bremner
  5 siblings, 0 replies; 7+ messages in thread
From: David Bremner @ 2013-09-04  9:37 UTC (permalink / raw)
  To: Mark Walters, notmuch

Mark Walters <markwalters1009@gmail.com> writes:

> This series adds some tests for various existing and recently added
> functionality.
>
> The only thing to note is that the xapian tag database and the
> displayed tags are update separately so we need to test both.
>

pushed, 

d

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-04  9:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 14:04 [PATCH 0/4] contrib: pick: extra tests Mark Walters
2013-09-03 14:04 ` [PATCH 1/4] contrib: pick: test: tag/untag single message Mark Walters
2013-09-03 14:04 ` [PATCH 2/4] contrib: pick: test: tag/untag whole thread Mark Walters
2013-09-03 14:04 ` [PATCH 3/4] contrib: pick: test: stash message id Mark Walters
2013-09-03 14:05 ` [PATCH 4/4] contrib: pick: test: buffer movement Mark Walters
2013-09-03 15:07 ` [PATCH 0/4] contrib: pick: extra tests Tomi Ollila
2013-09-04  9:37 ` David Bremner

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).