X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT465-emacs-unthreaded.sh;h=e7bc1439c50dc66632d5b3f905c55a5a59f9335b;hb=e663231681b129befadd9f66cb064c104149fb16;hp=16ff89a9b977ed257fcfb44e9d61c6feb620a272;hpb=14326e6cb77fe3061dc7ea70419837c7c19c34ae;p=notmuch diff --git a/test/T465-emacs-unthreaded.sh b/test/T465-emacs-unthreaded.sh index 16ff89a9..e7bc1439 100755 --- a/test/T465-emacs-unthreaded.sh +++ b/test/T465-emacs-unthreaded.sh @@ -6,6 +6,8 @@ test_description="emacs unthreaded interface" test_require_emacs +EXPECTED=$NOTMUCH_SRCDIR/test/emacs-unthreaded.expected-output + generate_message "[id]=large-thread-1" '[subject]="large thread"' printf " 2001-01-05 Notmuch Test Suite large thread%43s(inbox unread)\n" >> EXPECTED.unthreaded @@ -26,7 +28,6 @@ test_emacs '(let ((max-lisp-eval-depth 10)) test_expect_equal_file EXPECTED.unthreaded OUTPUT test_begin_subtest "message from large thread (status)" -test_subtest_known_broken output=$(test_emacs '(let ((max-lisp-eval-depth 10)) (notmuch-unthreaded "subject:large-thread") (notmuch-test-wait) @@ -35,4 +36,25 @@ output=$(test_emacs '(let ((max-lisp-eval-depth 10)) "SUCCESS")' ) test_expect_equal "$output" '"SUCCESS"' +add_email_corpus +test_begin_subtest "Functions in unthreaded-result-format" +test_emacs ' +(let + ((notmuch-unthreaded-result-format + (quote (("date" . "%12s ") + ("authors" . "%-20s") + ("subject" . "%-54s") + (notmuch-test-result-flags . "(%s)"))))) + (notmuch-unthreaded "tag:inbox") + (notmuch-test-wait) + (test-output)) +' +test_expect_equal_file $EXPECTED/result-format-function OUTPUT + +test_begin_subtest "notmuch-unthreaded with nonexistent CWD" +test_emacs '(test-log-error + (let ((default-directory "/nonexistent")) + (notmuch-unthreaded "*")))' +test_expect_equal "$(cat MESSAGES)" "COMPLETE" + test_done