test_description="emacs notmuch-hello view"
. $(dirname "$0")/test-lib.sh || exit 1
-. $(dirname "$0")/test-lib-emacs.sh || exit 1
+. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output
notmuch tag -$tag '*'
test_expect_equal_file $EXPECTED/notmuch-hello-long-names OUTPUT
+test_begin_subtest "All tags show up"
+tag=exclude_me
+notmuch tag +$tag '*'
+notmuch config set search.exclude_tags $tag
+test_emacs '(notmuch-hello)
+ (test-output)'
+notmuch tag -$tag '*'
+test_expect_equal_file $EXPECTED/notmuch-hello-all-tags OUTPUT
+
+test_done
+test_begin_subtest "notmuch-hello with nonexistent CWD"
+test_emacs '
+ (notmuch-hello)
+ (test-log-error
+ (let ((default-directory "/nonexistent"))
+ (notmuch-hello-update)))'
+test_expect_equal "$(cat MESSAGES)" "COMPLETE"
+
test_done