X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT460-emacs-tree.sh;h=0f23b418ecfa1bd8da04676f9d327a14b2e7fe5e;hb=2d036dbc3b6e48b12ab3e8aa0cbe713d2ef96854;hp=958ff888a8652127a855ffe2509af61e247cd11a;hpb=0aba694c11846f76cfa64470d10a50cec8e43bd5;p=notmuch diff --git a/test/T460-emacs-tree.sh b/test/T460-emacs-tree.sh index 958ff888..0f23b418 100755 --- a/test/T460-emacs-tree.sh +++ b/test/T460-emacs-tree.sh @@ -1,10 +1,12 @@ #!/usr/bin/env bash test_description="emacs tree view interface" -. ./test-lib.sh || exit 1 +. $(dirname "$0")/test-lib.sh || exit 1 +. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1 -EXPECTED=$TEST_DIRECTORY/tree.expected-output +EXPECTED=$NOTMUCH_SRCDIR/test/emacs-tree.expected-output +test_require_emacs add_email_corpus test_begin_subtest "Basic notmuch-tree view in emacs" @@ -177,4 +179,25 @@ output=$(test_emacs '(notmuch-tree "tag:inbox") (notmuch-show-stash-message-id)') test_expect_equal "$output" "\"Stashed: id:1258493565-13508-1-git-send-email-keithp@keithp.com\"" +test_begin_subtest "Functions in tree-result-format" +test_emacs ' +(let + ((notmuch-tree-result-format + (quote (("date" . "%12s ") + ("authors" . "%-20s") + ((("tree" . "%s") + ("subject" . "%s")) . " %-54s ") + (notmuch-test-result-flags . "(%s)"))))) + (notmuch-tree "tag:inbox") + (notmuch-test-wait) + (test-output)) +' +test_expect_equal_file $EXPECTED/result-format-function OUTPUT + +test_begin_subtest "notmuch-tree with nonexistent CWD" +test_emacs '(test-log-error + (let ((default-directory "/nonexistent")) + (notmuch-tree "*")))' +test_expect_equal "$(cat MESSAGES)" "COMPLETE" + test_done