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 "Refreshed notmuch-pick view in emacs"
27 test_emacs '(add-to-list (quote load-path) "'$PICK_DIR'")
28 (require (quote notmuch-pick))
29 (notmuch-pick "tag:inbox")
31 (notmuch-pick-refresh-view)
34 (delete-other-windows)'
35 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox
37 test_begin_subtest "Navigation of notmuch-hello to search results"
38 test_emacs '(notmuch-hello)
39 (goto-char (point-min))
40 (re-search-forward "inbox")
41 (widget-button-press (1- (point)))
43 (notmuch-pick-from-search-current-query)
46 (delete-other-windows)'
47 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-tag-inbox
49 test_begin_subtest "Pick of a single thread (from search)"
50 test_emacs '(notmuch-hello)
51 (goto-char (point-min))
52 (re-search-forward "inbox")
53 (widget-button-press (1- (point)))
55 (notmuch-pick-from-search-thread)
58 (delete-other-windows)'
59 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread
61 test_begin_subtest "Pick of a single thread (from show)"
62 test_emacs '(notmuch-hello)
63 (goto-char (point-min))
64 (re-search-forward "inbox")
65 (widget-button-press (1- (point)))
67 (notmuch-search-show-thread)
68 (notmuch-pick-from-show-current-query)
71 (delete-other-windows)'
72 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-single-thread
74 test_begin_subtest "Message window of pick"
75 test_emacs '(notmuch-hello)
76 (goto-char (point-min))
77 (re-search-forward "inbox")
78 (widget-button-press (1- (point)))
80 (notmuch-search-next-thread)
81 (notmuch-pick-from-search-thread)
83 (select-window notmuch-pick-message-window)
85 (delete-other-windows)'
87 test_expect_equal_file OUTPUT $EXPECTED/notmuch-pick-show-window