aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-29 12:23:35 -0700
committerDavid Bremner <david@tethera.net>2021-09-11 11:11:29 -0300
commit21e365f51a7ff17e5154cf06396aeafe3f7d9bd7 (patch)
treea2bfc055521c81e007af360078d8282830f6cb81
parente722b4f48c90ea6536ac7efef47f9d0f3d8cc191 (diff)
test/emacs: tests for notmuch-{tree,unthreaded} with bad CWD
These work thanks to the previous wrapping of process creation primitives.
-rwxr-xr-xtest/T460-emacs-tree.sh6
-rwxr-xr-xtest/T465-emacs-unthreaded.sh6
2 files changed, 12 insertions, 0 deletions
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