From 21e365f51a7ff17e5154cf06396aeafe3f7d9bd7 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 29 Aug 2021 12:23:35 -0700 Subject: [PATCH] test/emacs: tests for notmuch-{tree,unthreaded} with bad CWD These work thanks to the previous wrapping of process creation primitives. --- test/T460-emacs-tree.sh | 6 ++++++ test/T465-emacs-unthreaded.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/test/T460-emacs-tree.sh b/test/T460-emacs-tree.sh index 946583d9..0f23b418 100755 --- a/test/T460-emacs-tree.sh +++ b/test/T460-emacs-tree.sh @@ -194,4 +194,10 @@ test_emacs ' ' 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 diff --git a/test/T465-emacs-unthreaded.sh b/test/T465-emacs-unthreaded.sh index 1f386bf3..e7bc1439 100755 --- a/test/T465-emacs-unthreaded.sh +++ b/test/T465-emacs-unthreaded.sh @@ -51,4 +51,10 @@ test_emacs ' ' 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 -- 2.43.0