From b4e594a6f5ed452d025641ee9e3f45ca8c48c229 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 14 May 2019 12:29:33 +0200 Subject: [PATCH 4/4] T460-emacs-tree: test tagging on region in tree view --- test/T460-emacs-tree.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/test/T460-emacs-tree.sh b/test/T460-emacs-tree.sh index cb2c90b8..b68b905e 100755 --- a/test/T460-emacs-tree.sh +++ b/test/T460-emacs-tree.sh @@ -88,6 +88,45 @@ test_begin_subtest "Untag message in notmuch tree view (database)" output=$(notmuch search --output=messages 'tag:test_thread_tag') test_expect_equal "$output" "" +test_begin_subtest "Tag region in notmuch tree view" +test_emacs '(notmuch-tree "tag:inbox") + (notmuch-test-wait) + ;; move to test thread above so that we can reuse the test output. + (forward-line 23) + (set-mark-command) + (forward-line 7) + (notmuch-tree-tag (list "+test_thread_tag")) + (test-output) + (delete-other-windows)' +test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox-thread-tagged OUTPUT + +test_begin_subtest "Tag region in notmuch tree 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 region in notmuch tree view" +test_emacs '(notmuch-tree "tag:inbox") + (notmuch-test-wait) + ;; mark the same region as above + (forward-line 23) + (set-mark-command) + (forward-line 7) + (notmuch-tree-tag-thread (list "-test_thread_tag")) + (test-output) + (delete-other-windows)' +test_expect_equal_file $EXPECTED/notmuch-tree-tag-inbox OUTPUT + +test_begin_subtest "Untag region in notmuch tree 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)) -- 2.21.0