summaryrefslogtreecommitdiff
path: root/test/lisp/calendar/todo-mode-tests.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2017-06-02 13:14:44 -0400
committerGlenn Morris <rgm@gnu.org>2017-06-02 13:14:44 -0400
commitf0d79d2b8d3a8a0b2aa7b39519d1df32f0e335e6 (patch)
tree567080768e8af57c694bd91c61263cc73742a11c /test/lisp/calendar/todo-mode-tests.el
parentd801f5a2cf6c150841a65e5dbb378e840227f77f (diff)
downloademacs-f0d79d2b8d3a8a0b2aa7b39519d1df32f0e335e6.tar.gz
emacs-f0d79d2b8d3a8a0b2aa7b39519d1df32f0e335e6.tar.bz2
emacs-f0d79d2b8d3a8a0b2aa7b39519d1df32f0e335e6.zip
Fix with-todo-test
* test/lisp/calendar/todo-mode-tests.el (with-todo-test): HOME should be a directory, not a file. Delete it when finished.
Diffstat (limited to 'test/lisp/calendar/todo-mode-tests.el')
-rw-r--r--test/lisp/calendar/todo-mode-tests.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lisp/calendar/todo-mode-tests.el b/test/lisp/calendar/todo-mode-tests.el
index 5e1a22b37be..08dfe541929 100644
--- a/test/lisp/calendar/todo-mode-tests.el
+++ b/test/lisp/calendar/todo-mode-tests.el
@@ -44,13 +44,15 @@
(defmacro with-todo-test (&rest body)
"Set up an isolated todo-mode test environment."
- `(let* ((todo-test-home (make-temp-file "todo-test-home-"))
+ `(let* ((todo-test-home (make-temp-file "todo-test-home-" t))
(process-environment (cons (format "HOME=%s" todo-test-home)
process-environment))
(todo-directory todo-test-data-dir)
(todo-default-todo-file (todo-short-file-name
(car (funcall todo-files-function)))))
- ,@body))
+ (unwind-protect
+ (progn ,@body)
+ (delete-directory todo-test-home t))))
;; (defun todo-test-show (num &optional archive)
;; "Display category NUM of test todo file.