3 test_description="emacs pick interface"
6 EXPECTED=$TEST_DIRECTORY/pick.expected-output
9 test_begin_subtest "Do we have emacs"
10 test_emacs '(insert "hello\n")
15 test_expect_equal_file OUTPUT EXPECTED
17 test_begin_subtest "Basic notmuch-pick view in emacs"
18 test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
19 (require (quote notmuch-pick))
20 (notmuch-pick "tag:inbox")
23 (delete-other-windows)'
24 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox
26 test_begin_subtest "Navigation of notmuch-hello to search results"
27 test_emacs '(notmuch-hello)
28 (goto-char (point-min))
29 (re-search-forward "inbox")
30 (widget-button-press (1- (point)))
32 (notmuch-pick-from-search-current-query)
35 (delete-other-windows)'
36 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox
38 test_begin_subtest "Pick of a single thread (from search)"
39 test_emacs '(notmuch-hello)
40 (goto-char (point-min))
41 (re-search-forward "inbox")
42 (widget-button-press (1- (point)))
44 (notmuch-pick-from-search-thread)
47 (delete-other-windows)'
48 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread
50 test_begin_subtest "Pick of a single thread (from show)"
51 test_emacs '(notmuch-hello)
52 (goto-char (point-min))
53 (re-search-forward "inbox")
54 (widget-button-press (1- (point)))
56 (notmuch-search-show-thread)
57 (notmuch-pick-from-show-current-query)
60 (delete-other-windows)'
61 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread
63 test_begin_subtest "Message window of pick"
64 test_emacs '(notmuch-hello)
65 (goto-char (point-min))
66 (re-search-forward "inbox")
67 (widget-button-press (1- (point)))
69 (notmuch-search-next-thread)
70 (notmuch-pick-from-search-thread)
72 (select-window notmuch-pick-message-window)
74 (delete-other-windows)'
76 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-show-window