test_description="emacs notmuch-show view"
. $(dirname "$0")/test-lib.sh || exit 1
+. $(dirname "$0")/test-lib-emacs.sh || exit 1
EXPECTED=$NOTMUCH_SRCDIR/test/emacs-show.expected-output
+test_require_emacs
add_email_corpus
test_begin_subtest "Hiding Original Message region at beginning of a message"
(let ((inhibit-read-only t)) (erase-buffer)))
(condition-case err
(notmuch-show \"*\")
- (error (message \"%s\" (second err))))
+ (error (message \"%s\" (cadr err))))
(notmuch-test-wait)
(with-current-buffer \"*Messages*\"
(test-output \"MESSAGES\"))
(test-visible-output)'
test_expect_equal_file $EXPECTED/notmuch-show-undecryptable-message OUTPUT
+test_begin_subtest "show encrypted message when not processing crypto"
+test_emacs '(let ((notmuch-crypto-process-mime nil))
+ (notmuch-show "id:basic-encrypted@crypto.notmuchmail.org")
+ (test-visible-output))'
+test_expect_equal_file $EXPECTED/notmuch-show-decrypted-message-no-crypto OUTPUT
+
test_done