]> git.notmuchmail.org Git - notmuch/commitdiff
test/emacs: test for notmuch-show with nonexistent CWD
authorDavid Bremner <david@tethera.net>
Sun, 29 Aug 2021 19:23:33 +0000 (12:23 -0700)
committerDavid Bremner <david@tethera.net>
Sat, 11 Sep 2021 13:30:25 +0000 (10:30 -0300)
Somewhat predictably, the other code path in
notmuch-call-notmuch--helper also needs to be fixed.

test/T450-emacs-show.sh

index 5bb5b201a53faa1d0c11fbaa0319b3a085b2b0b6..03f953aab9052f9e61c820e6033ea9009d35c743 100755 (executable)
@@ -236,4 +236,12 @@ test_emacs '(let ((notmuch-crypto-process-mime nil))
              (test-visible-output))'
 test_expect_equal_file $EXPECTED/notmuch-show-decrypted-message-no-crypto OUTPUT
 
+test_begin_subtest "notmuch-show with nonexistent CWD"
+tid=$(notmuch search --limit=1 --output=threads '*' | sed s/thread://)
+test_subtest_known_broken
+test_emacs "(test-log-error
+             (let ((default-directory \"/nonexistent\"))
+               (notmuch-show \"$tid\")))"
+test_expect_equal "$(cat MESSAGES)" "COMPLETE"
+
 test_done