From d96863e54d1cd3bbcdd17aae914c951fe17e1598 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Tue, 3 Sep 2013 15:04:57 +0100 Subject: contrib: pick: test: tag/untag single message --- contrib/notmuch-pick/test/emacs-pick | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'contrib/notmuch-pick/test/emacs-pick') 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)) -- cgit v1.2.3