3 test_description="emacs notmuch-show view"
6 EXPECTED=$TEST_DIRECTORY/emacs-show.expected-output
10 test_begin_subtest "Hiding Original Message region at beginning of a message"
11 message_id='OriginalMessageHiding.1@notmuchmail.org'
14 '[subject]="Hiding Original Message region at beginning of a message"' \
15 '[body]="-----Original Message-----
19 Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
20 Subject: Hiding Original Message region at beginning of a message
21 To: Notmuch Test Suite <test_suite@notmuchmail.org>
22 Date: Fri, 05 Jan 2001 15:43:57 +0000
24 [ 2-line hidden original message. Click/Enter to show. ]
27 test_emacs "(notmuch-show \"id:$message_id\")
28 (test-visible-output)"
29 test_expect_equal_file OUTPUT EXPECTED
31 test_begin_subtest "Bare subject #1"
32 output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
33 test_expect_equal "$output" '"subject"'
35 test_begin_subtest "Bare subject #2"
36 output=$(test_emacs '(notmuch-show-strip-re "re:Re: re: Re: re:subject")')
37 test_expect_equal "$output" '"subject"'
39 test_begin_subtest "Bare subject #3"
40 output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
41 test_expect_equal "$output" '"the cure: fix the regexp"'
43 test_begin_subtest "don't process cryptographic MIME parts"
44 test_emacs '(let ((notmuch-crypto-process-mime nil))
45 (notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
46 (test-visible-output))'
47 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-off
49 test_begin_subtest "process cryptographic MIME parts"
50 test_emacs '(let ((notmuch-crypto-process-mime t))
51 (notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
52 (test-visible-output))'
53 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on
55 test_begin_subtest "process cryptographic MIME parts (w/ notmuch-show-toggle-process-crypto)"
56 test_emacs '(let ((notmuch-crypto-process-mime nil))
57 (notmuch-show "id:20091117203301.GV3165@dottiness.seas.harvard.edu")
58 (notmuch-show-toggle-process-crypto)
59 (test-visible-output))'
60 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-process-crypto-mime-parts-on
62 test_begin_subtest "notmuch-show: don't elide non-matching messages"
63 test_emacs '(let ((notmuch-show-only-matching-messages nil))
64 (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
66 (notmuch-search-show-thread)
68 (test-visible-output))'
69 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-off
71 test_begin_subtest "notmuch-show: elide non-matching messages"
72 test_emacs '(let ((notmuch-show-only-matching-messages t))
73 (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
75 (notmuch-search-show-thread)
77 (test-visible-output))'
78 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
80 test_begin_subtest "notmuch-show: elide non-matching messages (w/ notmuch-show-toggle-elide-non-matching)"
81 test_emacs '(let ((notmuch-show-only-matching-messages nil))
82 (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
84 (notmuch-search-show-thread)
86 (notmuch-show-toggle-elide-non-matching)
87 (test-visible-output))'
88 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
90 test_begin_subtest "notmuch-show: elide non-matching messages (w/ prefix arg to notmuch-show)"
91 test_emacs '(let ((notmuch-show-only-matching-messages nil))
92 (notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
94 (let ((current-prefix-arg t))
95 (notmuch-search-show-thread))
97 (test-visible-output))'
98 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-elide-non-matching-messages-on
100 test_begin_subtest "notmuch-show: disable indentation of thread content (w/ notmuch-show-toggle-thread-indentation)"
101 test_emacs '(notmuch-search "from:lars@seas.harvard.edu and subject:\"Maildir storage\"")
103 (notmuch-search-show-thread)
105 (notmuch-show-toggle-thread-indentation)
106 (test-visible-output)'
107 test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-indent-thread-content-off