aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/notmuch-pick/test/emacs-pick
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2013-09-03 15:04:57 +0100
committerGravatar David Bremner <bremner@debian.org>2013-09-04 06:32:58 -0300
commitd96863e54d1cd3bbcdd17aae914c951fe17e1598 (patch)
tree237961e7d9b63f4c9e8671967d44660aa161cca8 /contrib/notmuch-pick/test/emacs-pick
parent2f7cfcd320ba2ce11834756ec8cbca8b9245e62d (diff)
contrib: pick: test: tag/untag single message
Diffstat (limited to 'contrib/notmuch-pick/test/emacs-pick')
-rwxr-xr-xcontrib/notmuch-pick/test/emacs-pick34
1 files changed, 34 insertions, 0 deletions
diff --git a/contrib/notmuch-pick/test/emacs-pick b/contrib/notmuch-pick/test/emacs-pick
index 37f974ad..909f76ab 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))